ChartCanvasAxis.Opposite

Syntax

Opposite: Boolean;

Description

The Opposite property indicates whether chart axis is placed in the inverse manner to its initial position.

Comments

The property is read-only.

Available values:

Example

Executing the example requires that the HTML page contains the Chart component named chart (see Example of Creating a Scatter Chart). Place Y axis to the right of the chart plot area:

// Get Y axis of the chart
var axis = chart.getYAxis();
// Place the axis to the right of the chart plot area
var settings = axis.getSettings();
settings.Position = "max";
axis.setSettings(settings);
// Redraw the chart
chart.redraw(true);
if (axis.getOpposite()) {
    console.log("Chart plot axis mirrors its initial position");
} else {
    console.log("Chart axis position is not changed");
};

After executing the example Y axis is placed to the right of the chart plot area, that is, in the inverse manner to its initial position. The browser console shows a corresponding notice:

Chart plot axis mirrors its initial position

See also:

ChartCanvasAxis