Hi Claude,
You may use Axis.setLabels or Axis.setLinearScale to configure the secondary y-axis. For example:
c.yAxis2().setLabels(new string[] { "ON", "OFF"});
Note that the scale of an axis is not the same as the labels. The scale is used to position things and is always numeric or date/time. For example, if the axis scale is 0 to 3, and you put a point at y = 1.5, the point will be in the middle of the axis. Labels are for human reading and have no meaning to ChartDirector. You can use any labels you like on the axis, regardless of the scale. For example, if the axis scale is 0 to 3, you can use the labels {0, 1, 2, 3} or you can use the labels {"Low", "Medium", "High"} or even something like {"Apple", "1-1-2013", "444"}.
For your case, I am not sure if your are using the secondary y-axis just for displaying labels, or if it also contains a scale for positioning points. If it also has a scale, then you may to use something like:
c.yAxis2().setLinearScale2(0, 8, new string[] { "aa", "ON", "OFF", "bb"});
Then for your data layers, you would need to use setUseYAxis2, so that ChartDirector knows your data should be positioned using the secondary y-axis.
Hope this can help.
Regards
Peter Kwan |