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

Message ListMessage List     Post MessagePost Message

  x-axis value alignment
Posted by Prathika on Jun-30-2011 13:59
Hi,

My yaxis value has some set of values i.e., some time it contains only postive values  and some time it contains negative values . Based on that this value will be plot on the graph.
Is it possible for displaying the negative and postive values using setAutoScale() method. I dont know the exact length of y axis values.



I want to display the date with  time (hh:mm) or time  values in x-axis label with proper alignment i.e., if number of x-axis values more then chartdirector automatically arrange the
values in x-axis and not displays the values one over another.

Waiting for your response.

Regards,
K.Prathika

  Re: x-axis value alignment
Posted by Peter Kwan on Jul-01-2011 01:05
Hi Prathika,

If your y data values contains both positive and negative values, and you do not configure the y-axis scale, ChartDirector will automatically configure the y-axis scale to include both positive and negative values. There is no need to use setAutoScale.

If you are using a true date/time x-axis (you are using setXData to configure the DateTime x-coordinates of your data points), ChartDirector will automatically label the x-axis to ensure they are space between the labels. For example, see the sample code "Uneven Data Points" and "Binary Data Series".

If you are using a label based x-axis (configured using setLabels or setLabels2), you may use setLabelStep to ensure there are sufficient spacing between two labels. For example (in C#):


//at least 75 pixels between labels
c.xAxis().setLabelStep(Math.Max(1, myLabels.Length * 75 / c.getPlotArea().getWidth()));

If you want to control the label format, you may use Axis.setLabelFormat or Axis.setMultiFormat. (See "Binary Data Series" for an example.)

Hope this can help.

Regards
Peter Kwan