Hi,
I am plotting values with distance as the x-axis. If I zoom in a lot, I want the x-scale to be
millimeters (I want the x-axis marks to show something like "354 mm"). As I start to zoom
out, I want it to change to meters (showing "5.5 m") and as I keep zooming out I want it to
change to kilometers.
I get a sense that it is possible with the setFormatCondition and setLabelFormat methods
for the axis, but I'm not sure how.
I tried this:
c->xAxis()->setFormatCondition(">", 1000);
c->xAxis()->setLabelFormat("={value}/1000 m");
but it actually displays the x-axis marks as: "=3500/1000 m" instead of "3.5 m"
Thanks in advance |