This section is regarding Methods and Properties available in all Axis Elements – axisX, axisY, axisX2 & axisY2.
Example :Method | Description | Example |
---|---|---|
get(String propertyName) | Returns the specified property of Axis | chart.axisX[0].get(“minimum”); |
set(String propertyName, Mixed value [,Boolean updateChart = true]) | Sets the specified property of Axis & optionally updates (default) the chart | chart.axisX[0].set(“minimum”, 10, true); |
addTo(String arrayName, Object options [, Number index = array.length]) | Adds a new element of given type to the specified array. | chart.axisX[0].addTo(“stripLines”, {value: 20}); |
remove([Boolean updateChart = true]) | Remove the specified axis | chart.axisX[2].remove(); |
convertValueToPixel(Number value) | Converts value in axis Scale to Pixel Coordinates | chart.axisX[0].convertValueToPixel(20); |
convertPixelToValue(Number pixel) | Converts given pixel value to axis Scale | chart.axisX[0].convertPixelToValue(250); |
Can be accessed via get method or dot notation.
Property | Description | Example |
---|---|---|
bounds | Bounding rectangle of Axis: {x1, x2, y1, y2} | chart.bounds / chart.axisX[0].get(“bounds”) |
All Axis options become available as properties after Chart Render. You can access them either via get method or dot notation. But you can change / set those values only via set method.
Please refer to Axis Element for complete list of properties available.