Overview Sparkline Y-axis Fixup

.. just use min/max -/+ 10% of difference between the 2
This commit is contained in:
Mark Liversedge
2017-02-14 21:13:08 +00:00
parent 7b4fc559cc
commit 813d32f01a

View File

@@ -380,7 +380,8 @@ Card::setData(RideItem *item)
if (v>max) max=v;
if (v<min) min=v;
}
//chart->axisY(lineseries)->setRange(min,max); //XXX need to fix axis calculation
double diff = (max-min)/10.0f;
chart->axisY(lineseries)->setRange(min-diff,max+diff); // add 10% to each direction
}
}