Plot details - barchart reports

Josh Sled jsled at
Thu Feb 7 12:08:33 EST 2008

"Davide Imbeni" <davide.imbeni at> 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

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 - a=jsled;; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : 

More information about the gnucash-devel mailing list