Scale.getAxisSpec()
Retrieves the axis properties for the Scale as an AxisSpec object. The corresponding “setter” function is Scale.setAxisSpec(spec).
Returns
- spec
-
an AxisSpec object
Example
Chart Component Script
var coord = graph.getCoordinate(); (1)
var scale = coord.getYScale(); (2)
var spec = scale.getAxisSpec(); (3)
// Compact syntax: var spec = graph.getCoordinate().getYScale().getAxisSpec();
spec.setTickVisible(false); (4)
| 1 | Get a handle to the Coordinate object. |
| 2 | Get a handle to the Scale object. |
| 3 | Use getAxisSpec to obtain a handle to the AxisSpec. |
| 4 | Set desired properties of the AxisSpec. |
Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.
|