Hi Eddy,
Are you using Layer.setXData to set the x data value to the layer, like:
myLayer.setXData(masterArrayDateTimes);
If the above is the case, it is likely the x-axis labels are automatically generated by
ChartDirector (just like the y-axis labels are automatically generated by ChartDirector). The
number of x-axis labels are not related to the number of data points, just like the number of
y-axis labels are not related to the number of data points.
The Axis.setLabelStep is only useful if your code provides the labels. If ChartDirector
automatically determines the labels, the Axis.setLabelStep has no effect (as the number of
labels are not related to the number of data points). ChartDirector would space the labels
according to Axis.setTickDensity, which defaults to 50 pixels. For your case, I suspect the
label format and font size is such that adjacent labels may occasionally overlap. In this
case, some of the labels will be hidden due to overlapping. To solve the problem, you may
use a wide tick density to ensure the labels cannot overlap. For example:
c.xAxis().setTickDensity(75);
Hope this can help.
Regards
Peter Kwan |