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

Message ListMessage List     Post MessagePost Message

  Zooming - Label distribution
Posted by Lofi on Jul-01-2013 14:23
I have a chart with even distribution of labels which are dates. When the chart is displayed I have on the x-axis:

00:00 01:00 02:00 03:00 ... 23:00 00:00

When I zoom in this all changes to e. g.

... 06:10 07:33 08:56 ...

And moreover, when I zoom out to show the full chart again I have

00:13 ... and so on

Is it possible to tell ChartDirecotr to keep the dates at a minimum rounded value, e. g. 15 minutes, i. e. at most it should display 00:00 00:15 00:30 00:45 01:00 ...?

Thank you very much for your help!

  Re: Zooming - Label distribution
Posted by Peter Kwan on Jul-02-2013 01:18
Hi Lofi,

If the x-axis is auto-scaled by ChartDirector, and a date scale is used, ChartDirector should never select labels like "... 06:10 07:33 08:56 ...". Is it possible that the scale is changed to linear scale? (Are you using syncDateAxisWithViewPort or syncLinearAxisWithViewPort?)

In linear scale, ChartDirector may select labels at something like 0, 100, 200, 300 ... If you then format them as nn:ss, it will become 00:00, 01:40, 03:20, ..... On the other hand, in date scale, Chartdirector may use something like 60, 120, 180, 240, .... If the same format nn:ss is used, the labels become 00:00, 01:00, 02:00, ... which are much more natural as date/time labels.

If the above still does not solve the problem, is it possible to inform me the charting part of your code to help me diagnose the issue?

Regards
Peter Kwan

  Re: Zooming - Label distribution
Posted by Lofi on Jul-02-2013 13:40
Hello Peter,

thank you very much for your appreciated help! The problem was that I used syncLinearAxisWithViewPort for a date x-axis. Using syncDateAxisWithViewPort solved the problem.

Best regards
Lofi