Re: request for help preparing balance line chart report for inclusion in trunk

2009-04-13 Thread Derek Atkins
Tim Abell t...@timwise.co.uk writes:

 Hello all,

 I've got a workable scm report that shows balance of an account over
 time as a line graph.
 The source can be found at:
 http://github.com/timabell/gnucash-account-balance-chart/commits/balance-chart

 I'd love to see this included in the trunk of gnucash at some point
 but am aware that there are a few shortcomings.

 Is there anyone out there who would be willing to help me get this
 report up to scratch so it can be submitted for inclusion?

Create a bug report with the patch against trunk?

 Thanks

 Tim Abell.

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: request for help preparing balance line chart report for inclusion in trunk

2009-04-13 Thread Tim Abell

Good point, thanks Derek.

The relevant bug report is:
http://bugzilla.gnome.org/show_bug.cgi?id=570011

I did put a patch up, but I am unsure if I've done it right.

Thanks

Tim

Derek Atkins wrote:

Tim Abell t...@timwise.co.uk writes:

  

Hello all,

I've got a workable scm report that shows balance of an account over
time as a line graph.
The source can be found at:
http://github.com/timabell/gnucash-account-balance-chart/commits/balance-chart

I'd love to see this included in the trunk of gnucash at some point
but am aware that there are a few shortcomings.

Is there anyone out there who would be willing to help me get this
report up to scratch so it can be submitted for inclusion?



Create a bug report with the patch against trunk?

  

Thanks

Tim Abell.



-derek

  

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: request for help preparing balance line chart report for inclusion in trunk

2009-04-13 Thread Tim Abell



Andrew Sackville-West wrote:

On Sun, Apr 12, 2009 at 12:35:18AM +0100, Tim Abell wrote:
  

Hello all,

I've got a workable scm report that shows balance of an account over  
time as a line graph.

The source can be found at:
http://github.com/timabell/gnucash-account-balance-chart/commits/balance-chart

I'd love to see this included in the trunk of gnucash at some point but  
am aware that there are a few shortcomings.


Is there anyone out there who would be willing to help me get this  
report up to scratch so it can be submitted for inclusion?



without actually going to look at the code at the moment, in what way
do you feel it has shortcomings? provided the report 1) *works*, 2)
more or less follows the style and structure of the existing reports,
and 3) doesn't have any obvious crasher bugs (by that I mean well
tested, especially in a multi-currency configuration and some corner
cases, like no account selected etc) then it should be good. 


As Derek said, provide a patch against trunk and attach it to a RFE
bug, or post it as an attachment to this thread, and I'll look it
over. 


A
  
  

Thanks for your comments,

1) It worked for me, hopefully it would work for others, though I can't 
tell from here :-) I found it quite enlightening being able to visualize 
the ups and downs of my accounts.
2) On the code side, it was mostly a copy and paste job, so hopefully 
not too far out. On the display side, it's nothing more than the 
selected account name and the graph, though I'm sure it would benefit 
from some extra work.
3) It's probably not terribly bad data proof so that would likely be an 
area for extra work, and I haven't done any work on other currencies, 
and I'm afraid I hard coded pounds as the scale (bad programmer!).


Current version attached.

Yours

Tim





___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
  

;; balance-linechart.scm: A line chart report of account balances.
;; Based on many of the existing gnucash reports. Notably the price-scatter graph.
;;
;; By Tim Abell t...@timwise.co.uk  2009
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as   
;; published by the Free Software Foundation; either version 2 of   
;; the License, or (at your option) any later version.  
;;  
;; This program is distributed in the hope that it will be useful,  
;; but WITHOUT ANY WARRANTY; without even the implied warranty of   
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details. 
;;  
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact:
;;
;; Free Software Foundation   Voice:  +1-617-542-5942
;; 51 Franklin Street, Fifth FloorFax:+1-617-542-2652
;; Boston, MA  02110-1301,  USA   g...@gnu.org
;;
;; TODO: only allow single account selection in options
;; TODO: show one line per account (not sure if current graph system supports this)
;; TODO: fix x scale
;; TODO: show dates in x scale (not sure if current graph system supports this)
;; TODO: remove interval option (report doesn't summarise, it shows all transactions).
;; TODO: show loading progress
;; TODO: handle other currencies
;; 


(define-module (gnucash report balance-linechart))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (srfi srfi-1)) ;;needed for printf I think
(use-modules (ice-9 slib)) ;;needed for printf I think
(use-modules (gnucash gnc-module))

(require 'printf)

(debug-enable 'debug)
(debug-enable 'backtrace)

(gnc:module-load gnucash/report/report-system 0)
(gnc:module-load gnucash/gnome-utils 0) ;for gnc-build-url

;; This function will generate a set of options that GnuCash
;; will use to display a dialog where the user can select
;; values for your report's parameters.

(define optname-display-depth (N_ Account Display Depth))
(define optname-show-subaccounts (N_ Always show sub-accounts))
(define optname-accounts (N_ Account))

(define optname-marker (N_ Marker))
(define optname-markercolor (N_ Marker Color))
(define optname-plot-width (N_ Plot Width))
(define optname-plot-height (N_ Plot Height))

(define optname-from-date (N_ From))
(define optname-to-date (N_ To))
(define optname-stepsize (N_ Step Size))

(define (options-generator)
  (let* ((options (gnc:new-options)) 
 ;; This is just a helper function for making options.
 ;; See gnucash/src/scm/options.scm 

Re: request for help preparing balance line chart report for inclusion in trunk

2009-04-12 Thread Tim Abell

Hi Randy,

Thanks for your response.

I learnt just enough scheme to throw this report together ;-) Though it 
has been tough going at times.


You don't have to use git, but probably the easiest way of experimenting 
and sharing changes would be to clone my git repo on github, grab a free 
github account and push your changes to that. It's quite easy and I'll 
be happy to lend a hand.


To just grab the code, I've uploaded a tarball for you:
http://cloud.github.com/downloads/timabell/gnucash-account-balance-chart/2009-04-12-gnucash-balance-chart-b46817a2.tar.gz
(on my balance chart downloads  page 
http://github.com/timabell/gnucash-account-balance-chart/downloads)


I think this report will run against the latest stable release. You can 
simply copy the scm file to the right place and modify 
standard-reports.scm to include a reference to it (then restart 
gnucash), I can't remember if I relied on anything newer in trunk. You 
may even be able to simply use gnucash's custom reports system, though I 
haven't tried that. Take a look in my install script to see what I've done.


Let me know how you get on.

Thanks again.

Tim

Randy Abel wrote:
I'd sure like to look at your report and perhaps give you a hand with 
it.  I don't know scheme, but I know plenty of other development 
languages and environments and this report is just what I need for my 
gnucash install.  Would you mind sending me the 10 second how-to for 
utilizing your contribution?  Would I need to git the entire gnucash 
build and compile?


Randy Abel


On Sun, 2009-04-12 at 00:35 +0100, Tim Abell wrote:

Hello all,

I've got a workable scm report that shows balance of an account over 
time as a line graph.

The source can be found at:
http://github.com/timabell/gnucash-account-balance-chart/commits/balance-chart

I'd love to see this included in the trunk of gnucash at some point but 
am aware that there are a few shortcomings.


Is there anyone out there who would be willing to help me get this 
report up to scratch so it can be submitted for inclusion?


Thanks

Tim Abell.
___
gnucash-user mailing list
gnucash-u...@gnucash.org mailto:gnucash-u...@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


request for help preparing balance line chart report for inclusion in trunk

2009-04-11 Thread Tim Abell

Hello all,

I've got a workable scm report that shows balance of an account over 
time as a line graph.

The source can be found at:
http://github.com/timabell/gnucash-account-balance-chart/commits/balance-chart

I'd love to see this included in the trunk of gnucash at some point but 
am aware that there are a few shortcomings.


Is there anyone out there who would be willing to help me get this 
report up to scratch so it can be submitted for inclusion?


Thanks

Tim Abell.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel