KDAB / KDChart

A Qt tool for creating business and scientific charts. This is the canonical repository for KDChart.
https://www.kdab.com/kd-chart/
Other
135 stars 36 forks source link

Fix assert when there's no data to plot #30

Closed dfaure-kdab closed 2 years ago

dfaure-kdab commented 2 years ago

ASSERT: "divisor < 0 || divisor > 0" in file /d/qt/6/inst/include/QtCore/qpoint.h, line 266

The plane transformation matrix ended up with a -inf value, so plane->translate(QPointF(lastPoint.key + offset, lastPoint.value))) leads to NAN even if lastPoint.value is valid.

Fixed by replacing the ISNAN test on lastPoint.value with a test on a and b, i.e. the final coordinates.