[Libreoffice-bugs] [Bug 110993] Chart produces incorrect graph w/ some negative points when using large positive values in source cells

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed May 12 08:59:09 UTC 2021


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

Andreas Heinisch <andreas.heinisch at yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|andreas.heinisch at yahoo.de   |libreoffice-bugs at lists.free
                   |                            |desktop.org
             Status|ASSIGNED                    |NEW

--- Comment #22 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
After rechecking the calculation, I committed a patch to gerrit in order to
correct a small error in the spline calculation. However, this does not solve
the problem of this bug report.

The calculation of the spline should be correct, but the autoclipping to the
chart does not work. I tried to recalc the min and max values for the chart in
https://opengrok.libreoffice.org/xref/core/chart2/source/view/charttypes/AreaChart.cxx?r=4f6931d6#368
using:

std::vector< ExplicitScaleData > aScales( m_pPosHelper->getScales());
aScales[1].Minimum = *(std::min_element( aPoly.SequenceY[0].begin(),
aPoly.SequenceY[0].end()));
aScales[1].Maximum = *(std::max_element(aPoly.SequenceY[0].begin(),
aPoly.SequenceY[0].end()));
m_pPosHelper->setScales(aScales, m_pPosHelper->isSwapXAndY());

So the real bug here is that the automatic scaling of charts using cubic
splines does not work. Unfortunately, I don't understand enough in order to
solve this issue, but maybe someone with more insight in the chart creation
process may continue.

-- 
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/20210512/2fc12060/attachment.htm>


More information about the Libreoffice-bugs mailing list