LinearScale.getScaleRange()
Retrieves the scale range. The corresponding “setter” function is LinearScale.setScaleRange(range).
Returns
- range
-
a ScaleRange object
Example
Chart Component Script
var coord = graph.getCoordinate(); (1)
var scale = coord.getYScale(); (2)
var range = scale.getScaleRange(); (3)
// Compact syntax: var range = graph.getCoordinate().getYScale().getScaleRange();
range.setAbsoluteValue(true); (4)
| 1 | Get a handle to the Coordinate object. |
| 2 | Get a handle to the Scale object. |
| 3 | Get a handle to the ScaleRange object. |
| 4 | Set the desired ScaleRange properties. |
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.
|