GNOME Bugzilla – Bug 580545
Provide slice-specific callback functions in pie charts.
Last modified: 2009-11-16 13:00:34 UTC
The previous graphing system used by GnuCash provided slice-specific callbacks to allow a user to "drill down" easily into a summarized chart of some kind. However, this is no longer possible since GnuCash migrated to using libgoffice. See bug 343449 for the GnuCash side of things.
Pardon me; that should be bug 359224 for the GnuCash side of things.
I should have a look to gnucash code in order to see how this worked.
Gnucash displays graphs as goffice generated pixbufs. Pixbufs don't generate signals, only the window containing the pixbuf can do. The only thing we can do on the goffice side is to provide an API returning appropriate data for an event at a specified locus. Please let me know what you want to get from it (may be the current API is enough, by the way).
If nobody tells me what is needed, I'll just add a gog_plot_view_get_data_at_point function and implement it for pies, and consider the bug as fixed when done. int gog_plot_view_get_data_at_point (GogPlotView *view, double x, double *y, GogSeries **series); returned value would be the index in the series or -1 if nothing could be found. Would thatfix the gnucash issue?
The proposed function has been implemented and (mostly) works for pie plots. I'll make it work in bar/column plots as well and fix the border case issues i pies (actually in ring plots). Considering as fixed.