VisualFrame.getLegendSpec()

Returns the LegendSpec for the VisualFrame scale. The corresponding “setter” function is VisualFrame.setLegendSpec(spec).

Returns

spec

a LegendSpec object

Example

Chart Component Script
var elem = graph.getElement(0);  (1)
var frame = elem.getColorFrame(); (2)
var spec = frame.getLegendSpec(); (3)
spec.setBorderColor(java.awt.Color(0xff0000)); (4)
1 Use EGraph.getElement(index) to obtain a handle to the GraphElement.
2 Use GraphElement.getColorFrame() to obtain a handle to the ColorFrame.
3 Use getLegendSpec to obtain a handle to the LegendSpec.
4 Set desired properties of the legend.
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.