GNOME Bugzilla – Bug 152614
Handling negative values in pies
Last modified: 2009-11-06 14:43:57 UTC
The use of a negative value in a pie plot does not cause any warning. Instead gnumeric simply substitutes the absolute value of the cell contents. This should trigger a warning, with an explanation of what the chart engine has done, either during plot creation or during value changing. Otherwise, we may lead users astray. 1) new gnumeric 2) a1 gets 5, a2 gets -3, a3 gets 8, a4 gets 2 3) select a1:a4 4) click on "graphing" icon in toolbar 5) select pie chart "plot type" 6) click okay 7) instert the chart ==> the value of a2 which is -3 is plotted as |-3|=3 without any warning. --adrian
I can't see putting up a warning on recalc that would be too irritating for words. At best we could use an approach similar to bubble plots and offer a 'use absolute' 'treat as zero' and possibly 'use absolute but reverse the style' which would somehow make background <-> foreground. Although I don't see how it would work for images.
Should we toss this to goffice?
'use absolute but reverse the style' does not seem straightforward. I'd propose white background for negative values just like bubble plots. This is probably not so hard to implement.
Added three options for negative values: skip, use absolute with normal style, and use absolute with white background. Works in pies and rings. Default being "use absolute value" for compatibility. I consider this bug now fixed. We might also add an inverted filling mode if requested, even when using image backgrounds (we can add an inverted image buffer to GOImage), but this is more work and may be not very useful, so I'll play with it only if requested.