After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 330719 - piecharts drops negative data too - error message misleading
piecharts drops negative data too - error message misleading
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other Linux
: Normal minor
: ---
Assigned To: Josh Sled
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2006-02-10 20:19 UTC by Andreas Köhler
Modified: 2018-06-29 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas Köhler 2006-02-10 20:19:36 UTC
Piechart reports filter out accounts with nonpositive values, since their visualization would be confusion and kind of unnecessary.

Reproduction:
Create a new expense account and transfer a positive amount to some other account.
Open an Expense Piechart report.
"The selected accounts contain no data/transactions (or only zeroes) for the selected time period"

Expected Behavior:
Data can be zero or negative (not only zero).
(Maybe wrong report currency)

Source of the problem:
account-piecharts.scm
if null? combined -> calls gnc:html-make-empty-data-warning

maybe this warning should be split up to represent the two possible filters (=0 and <=0) for bar- and piecharts.
Comment 1 Josh Sled 2006-02-17 13:37:26 UTC
=0 piechart data points are still valid, I believe: they get printed in the legend, but have no segment in the graph report.

=0 bar-chart segments are valid: they are in the legend but with no segment in the graph.

<0 bar-chart segments are valid (with gog, anyways).

<0 pie-chart segments should probably display a warning near the graph in the report if there is one in a piechart of other valid segments ("This pie chart does not contain some negative values").

As well, the empty-data warning should appear if all the piechart segments are <=0.  This is what happens now.

I don't know if it's right to make the values positive,   Obviously the piechart can't display negative wedges, but taking the absolute value doesn't strike me as necessarily correct.   Maybe it should be an option --- "display negative values".  Then you could at least get the relative size of the positive and negative expense amounts.  Perhaps even with a different plot fill-pattern for the negative values to visually differentiate them.

I guess the simple fix is to make the error message read something like:

  "The selected accounts contain no data/transactions (or only zeroes
   (or only negative values)) for the selected time period."
Comment 2 Boris Zbarsky 2008-11-17 21:24:00 UTC
I just ran into this today.  Ideally the heading (with total) would include the negative values, as would the legend, but negative values would be dropped from the pie itself...  Otherwise the total in the heading starts to depend on the depth selected (which affects which things are grouped), which is pretty odd.
Comment 3 Boris Zbarsky 2008-11-17 21:26:54 UTC
Oh, and this can pop up for perfectly norrmal reasons, nothing to do with currency.  For example, the "United States Federal Income Tax" expense account can easily be negative for someone with a small income who gets FDIC credits that make their year-end tax liability negative.
Comment 4 John Ralls 2018-06-29 20:57:17 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=330719. Please continue processing the bug there and please update any external references or bookmarks.