ChartDirector 6.0 (Ruby Edition)

ArrayMath.selectRegularSpacing


Usage

selectRegularSpacing(majorTickStep [, minorTickStep [, initialMargin ]])

Description

Selects an evenly spaced subset of elements of the ArrayMath object.

The primary purpose of this method is to select the regularly spaced elements as ticks on an enumerated axis.

For example, if the majorTickStep is 10, and minorTickStep is 5, this method will select one out of 10 elements as major tick elements, and one of out of 5 elements as minor tick elements.

Major tick elements will remain intact. The remaining minor ticks elements will have their values replaced with MinorTickOnly. Non-selected elements will have their values replaced with NoValue, so they will not appear on the axis. The resulting array can be used directly in Axis.setLabels2.

Arguments

ArgumentDefaultDescription
majorTickStep(Mandatory)The spacing between major ticks.
minorTickStep0The spacing between minor ticks. 0 means no minor tick will be used.
initialMargin0The position of the first tick.

Return Value

The current ArrayMath object.