GraphElement.getColorFrame()

Retrieves the element’s ColorFrame. The corresponding “setter” function is GraphElement.setColorFrame(frame).

Returns

A ColorFrame object

Example

Chart Component Script
var elem = graph.getElement(0); (1)
var frame = elem.getColorFrame(); (2)
frame.setField("Customer:Company"); (3)
1 Obtain a handle to the GraphElement object.
2 Use getColorFrame to obtain a handle to the ColorFrame object.
3 Set the desired properties of the ColorFrame object.
To change the property on a Chart that was previously created with the Chart Editor, use “getter” methods such as EGraph.getElement(index) ① to obtain a handle to the desired GraphElement object. For example:
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.