mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
Fixed reversing y axis
This commit is contained in:
parent
55c5e577fb
commit
e7a301c8b6
@ -115,6 +115,7 @@ void ChartAxisEditor::on_pushButtonOk_clicked()
|
|||||||
} else {
|
} else {
|
||||||
axisData->update();
|
axisData->update();
|
||||||
}
|
}
|
||||||
|
m_chartItem->update();
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1177,7 +1177,12 @@ QString AbstractSeriesChart::axisLabel(int i, const AxisData &axisData)
|
|||||||
{
|
{
|
||||||
const qreal min = axisData.rangeMin();
|
const qreal min = axisData.rangeMin();
|
||||||
const qreal step = axisData.step();
|
const qreal step = axisData.step();
|
||||||
qreal value = min + i * step;
|
qreal value = 0;
|
||||||
|
if (axisData.reverseDirection() && min >= 0) {
|
||||||
|
value = min + (axisData.segmentCount() - i) * step;
|
||||||
|
} else {
|
||||||
|
value = min + i * step;
|
||||||
|
}
|
||||||
if (std::floor(step) == step) {
|
if (std::floor(step) == step) {
|
||||||
return QString::number(value);
|
return QString::number(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user