ChartDirector 7.0 (ASP/COM/VB Edition)

Axis.syncAxis


Usage

syncAxis(axis [, slope [, intercept ]])

Description

Synchronizes and align this axis with another axis using a linear formula.

This method is typically used if the two axes represent the same quantity but in different units. For example, one axis may represent temperature in Celsius, and the other in Fahrenheit, or they may represent lengths in meters and feet.

The scale of this axis (value) will be related to the scale of the source axis (value2) using the following formula:

value = value2 * slope + intercept

This method assumes the two axes are of the same length. An example is the left axis and right axis on an XYChart. If the source axis has configurations that affect the scale positions, such as axis margins (see Axis.setMargin) or axis indentation (see Axis.setIndent), they will be applied to the other axis as well so that their scales will align.

Arguments

ArgumentDefaultDescription
axis(Mandatory)The axis to synchronize to. A value of null means not to synchronize to any axis.
slope1The slope for synchronizing this axis to the other axis.
intercept0The intercept parameter for synchronizing this axis to the other axis.

Return Value

None