AxisSpec.getTextSpec()

Retrieves the axis TextSpec. The corresponding “setter” function is AxisSpec.setTextSpec(spec).

Returns

Example

Chart Component Script
var coord = graph.getCoordinate(); (1)
var scale = coord.getYScale(); (2)
var spec = scale.getAxisSpec(); (3)
var textspec = spec.getTextSpec(); (4)
// Compact syntax: textspec = graph.getCoordinate().getYScale().getAxisSpec().getTextSpec();

textspec.setFormat(java.text.DecimalFormat("##,###.00"));
1 Use EGraph.getCoordinate() to obtain a handle to the Coordinate.
2 Use RectCoord.getYScale() to obtain a handle to ttyhe Scale.
3 Use Scale.getAxisSpec() to get a handle to the AxisSpec.
4 Use getTextSpec to get a handle ot the TextSpec.
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.