AxisSpec.setMaxLabelSpacing(Number)
Specifies the maximum space in pixels reserved between axis labels. This value acts as an upper bound when the label spacing is calculated automatically based on available space and label distribution. The corresponding getter function is getMaxLabelSpacing().
Example
Chart Component Script
var spec = new AxisSpec();
spec.setMaxLabelSpacing(20); (1)
| 1 | Limit the maximum space between labels to 20 pixels. |
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.
|
|
To change the property on a Chart that was previously created with the Chart Editor, use EGraph.getCoordinate() ①, RectCoord.getXScale() ②, and Scale.getAxisSpec() ③ to obtain a handle to the desired Coordinate object, Scale object, and so on. For example:
|