RectCoord.getXScale()

Retrieves the Scale for the X-axis. The corresponding “setter” function is RectCoord.setXScale(scale).

Returns

scale

a Scale object

Example

Chart Component Script
var coord = graph.getCoordinate(); (1)
var xscale = coord.getXScale(); (2)
var xspec = xscale.getAxisSpec(); (3)
// Compact syntax: var xspec = graph.getCoordinate().getXScale().getAxisSpec();
xspec.setLineColor(java.awt.Color(0xff0000)); (4)
1 Obtain handle to Coordinate object.
2 Use getXScale to obtain a handle to the Scale object.
3 Obtain handle to AxisSpec object.
4 Set desired 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.