0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-03 12:04:05 +03:00

Fix position calculation

This commit is contained in:
Emil Sawicki
2022-03-13 07:02:52 +01:00
parent a77225af5d
commit f684acd53b
3 changed files with 39 additions and 7 deletions

View File

@@ -798,16 +798,17 @@ AxisData &AbstractSeriesChart::yAxisData() const
void AbstractSeriesChart::updateMinAndMaxValues()
{
qreal maxYValue = 0;
qreal minYValue = 0;
qreal maxXValue = 0;
qreal minXValue = 0;
if (m_chartItem->itemMode() == DesignMode) {
m_chartItem->xAxisData()->updateForDesignMode();
m_chartItem->yAxisData()->updateForDesignMode();
return;
}
qreal maxYValue = 0;
qreal minYValue = 0;
qreal maxXValue = 0;
qreal minXValue = 0;
for (SeriesItem* series : m_chartItem->series()){
for (qreal value : series->data()->values()){
minYValue = std::min(minYValue, value);