mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +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 {
|
||||
axisData->update();
|
||||
}
|
||||
m_chartItem->update();
|
||||
close();
|
||||
}
|
||||
|
||||
|
@ -1177,7 +1177,12 @@ QString AbstractSeriesChart::axisLabel(int i, const AxisData &axisData)
|
||||
{
|
||||
const qreal min = axisData.rangeMin();
|
||||
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) {
|
||||
return QString::number(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user