0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-03 03:57:31 +03:00

Add x axis field combobox to chart editor

This commit is contained in:
Emil Sawicki
2022-01-28 07:05:55 +01:00
parent 7a4b3646e3
commit 2452e37334
4 changed files with 30 additions and 13 deletions

View File

@@ -971,13 +971,7 @@ QString AbstractSeriesChart::axisLabel(int i, const AxisData &axisData)
{
const qreal min = axisData.rangeMin();
const qreal step = axisData.step();
qreal value = 0;
// For values below 0, axis is already reversed (value closer to 0 is higher)
if (axisData.reverseDirection() && min >= 0) {
value = min + (axisData.segmentCount() - i) * step;
} else {
value = min + i * step;
}
qreal value = min + i * step;
if (std::floor(step) == step) {
return QString::number(value);
}