Hi, I will just report what I found so far on the subject, after some digging and a lot of learning, and why I think I will now suspend further investigations.
I think barchart report(s) would be improved by one or more of the following: (A) background grids (B) value of the bar appears when you click on it (C) value of the bar appears when you hover on it with the mouse In my opinion, (B) and (C) would improve piechart report as well. (A) is supported by goffice, and straightforward to implement (I submitted a patch, kindly corrected by Timothy Janssen) and should now be ready. (B) is not new (see http://wiki.gnucash.org/wiki/Clickable_Reports_UI and http://bugzilla.gnome.org/show_bug.cgi?id=359224 ). As far as I can understand, there still is no easy way to implement it in goffice, at least not easy enough for me. (C) seems even more difficult (tooltips exist in GtkWidgtes, but I have no clue how to attach them to each bar in a goffice plot, if it is possible at all...) I will therefore be happy with the grid, and let the rest to experienced developers. :-) One additional question: I found hardly any documentation on the goffice library, and got the impression it is only used by gnucash and gnumeric. Have other alternatives been considered? Which could they be, and why have they been discarded (apart from backwards compatibility / least effort )? Thanks to everyone Davide On Thu, Feb 7, 2008 at 6:08 PM, Josh Sled <[EMAIL PROTECTED]> wrote: > "Davide Imbeni" <[EMAIL PROTECTED]> writes: > > > I would like to change slightly the appearance of the plots in bar-chart > > reports. > > As it is now it's a bit difficult to get an idea of the level of the bars > (a > > part from the first one on the left), so I would like to add a grid to the > > plot or, even better, have the actual numeric values visible (e.g. when > > clicking on the corresponding bar, or when pointing it without clicking, or > > even as a label close to it) > > These things would be provided by modifying how we call libgoffice, which > provides the actual plotting. The primary binding code between gnucash and > goffice is in src/gnome-utils/gnc-html-graph-gog.c. > > The interface between the reports and that code is through a couple of > levels… > > The report (scm code) will emit an <object> tag with <param> tags for the > various parameters. See src/report/report-system/html-barchart.scm. > > GtkHtml is configured for <object> tags (with a particular class-id) to be > handled by the aforementioned gnc-html-graph-gog code. It then parses the > params/data, and converts it into goffice's interface, and renders the report > into a pixmap. The pixmap is then returned to GtkHtml as the rendering of > the <object> tag. > > > > I don't know anything about scheme, guile, and extremely little about html, > > and before continuing my research, I would like to get directions and > > suggestions from the experts. > > > > Where to start from? Do I have to dig into scheme? Shall I create a custom > > report or change something in the stylesheet? > > - Make sure you know what's supported by goffice, and the details of what it > needs (for, say, labels on chart segments). > - Modify the pie/bar-chart generator code for those new parameters. > - Modify the gnc-html-graph-gog code for those new parameters. > - Modify the reports to use the new pie/bar-chart generator code. > > > We're here and happy to help if you have any questions. > > -- > ...jsled > http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo [EMAIL > PROTECTED] > _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
