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

Message ListMessage List     Post MessagePost Message

  how to set the xaxis lables in hour and minutes
Posted by prathika on Oct-12-2010 15:49
Hi,


I have to plot the graph in time based values.
For example,
x axis values are 12:30, 12.40, 12.45 ...
y axis has some values like 2,6,8,...

How can i set the xaxis labels and configure the values, because x-axis values are changed
and not the constant.

How can i set the labelstep. I collect the time and dependent cpu usage values i.e., y axis values for every 1 hour from the device.

Please provide the solution.

Thanks,
Prathika

  Re: how to set the xaxis lables in hour and minutes
Posted by Peter Kwan on Oct-13-2010 01:46
Hi prathika,

If your x-coordinates are not evenly spaced, and you want the data points to be non-evenly spaced to reflect the x-coordinates, you may consider to use a true date/time x-axis (instead of using a label based x-axis). You may refer to the sample code "Uneven Data Points" for an example. (You may look for "Uneven Data Points" in the ChartDirector documentation index.) For a true date/time x-axis, the x-axis can be auto-scaled like the y-axis, or you may use Axis.setDateScale to explicitly scale it. In either case, the label format can be configured using Axis.setLabelFormat.

If your x-coordinates are evenly spaced (such as always having 1 data point per hour), you can format them into the format you want, and pass the resulting text array to ChartDirector as axis labels. The exact method to format a date/time depends on your programming language. You may refer to your programming language documentation for details. If you need further help, please inform me of your programming language.

Hope this can help.

Regards
Peter Kwan