ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Change the x-axis scale depending on the zoom value
Posted by Mauricio on Sep-08-2012 03:02
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

  Re: Change the x-axis scale depending on the zoom value
Posted by Peter Kwan on Sep-10-2012 22:51
Hi Mauricio,

The format string should be:

"{={value}/1000} m"

Hope this can help.

Regards
Peter Kwan