[Libreoffice-bugs] [Bug 134224] Pie chart data rounding error

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 30 21:38:11 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=134224

Leyan <ouyang.leyan at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ouyang.leyan at hotmail.com

--- Comment #3 from Leyan <ouyang.leyan at hotmail.com> ---
The rounding of each percentage is correct, the fact that the sum is 101 is
just an artifact of the insufficient precision displayed. So the question is
whether it is better to have less precise individual values and a nicer total
or whether the current behavior should be kept?

I played a bit with it in Excel, this is only applied for integer percentage
values, not when there is additional precision displayed. A pie chart with
three identical parts will sum to 100% when the display format is 0% but 99.9%
when it is 0.0%. 

For these integer percentage values, the algorithm used seems to be to change
the displayed value by 1 for as many labels as necessary, starting with the
labels closest to 0.5. 

This simple algorithm can lead to pie charts displaying different percentages
even if the underlying value is the same, which is not great in my opinion. For
example, with a pie chart with 3 identical parts, the percentages displayed
will be 34%, 33%, 33%.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200830/22751f0f/attachment.htm>


More information about the Libreoffice-bugs mailing list