ChartDirector 6.0 (C++ Edition)

Axis.setLabelStep


Usage

void setLabelStep(int majorTickStep, int minorTickStep = 0, int majorTickOffset = 0, int minorTickOffset = -0x7fffffff);

Description

Shows a regularly spaced subset of the axis labels on the axis.

This method is typically used in conjunction with Axis.setLabels or Axis.setLabels2. These two methods define the full set of labels on the axis, one for each data point in a data set. In many cases, there may be too many labels and the axis may become overcrowded with labels. The setLabelStep method will cause the axis to show a regularly spaced subset of labels instead all labels.

Arguments

ArgumentDefaultDescription
majorTickStep(Mandatory)The spacing between visible labels (major ticks). For example, a value of 10 means displaying 1 label for every 10 labels.
minorTickStep0For labels that are not displayed, ChartDirector can optionally put a minor tick in its place. The argument specifies the spacing between minor ticks. For example, a value of 5 means displaying 1 minor tick for every 5 labels. 0 means no minor tick is used.
majorTickOffset0The offset used for selecting the labels. For example, if majorTickStep is set to 10, by default, ChartDirector will select the labels with index 0, 10, 20, 30 and so on. If the majorTickOffset argument is set to 3, then ChartDirector will select labels with index 3, 13, 23, 33 and so on.
minorTickOffset-7fffffffThe offset used for selecting minor tick points. The usage is the same as the majorTickOffset argument, except it applies to minor tick points. The default is to use the same value as majorTickOffset.

Return Value

None