[Libreoffice-bugs] [Bug 136963] chart upper Y bound is 1.2 when real range upper bound is 1

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jan 7 22:13:37 UTC 2021


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

--- Comment #7 from Leyan <ouyang.leyan at hotmail.com> ---
The best way if you want to understand better what is going on is to look at
the code:
https://github.com/LibreOffice/core/blob/90cc24d4728dc94a30865d3b3af9409d5967b45a/chart2/source/view/axes/ScaleAutomatism.cxx#L923

You can see that the additional space is mentioned in the comment, it is
explicitly calculated and not a side effect or a bug. When starting from 0, if
the max value is more that the largest tick * 20/21 (so "too close" to the
top), another gradation is added. In your example, if the largest value is more
than 20/21=0.9539095... then the maximum will be 1.2 and not 1.

It has been like this since at least 2007 (code history is more difficult to
get before that).

-- 
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/20210107/58a872fb/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list