MultiShapeFrame.setFields(arr)
Specifies the columns containing the shape specifications for the graphical elements. The corresponding “getter” function is getFields().
Example
Chart Component Script
dataset = [["State", "Quantity", "m1", "m2", "m3"], ["NJ", 200, 6,3,4], ["NY", 300,8,2,5]]; (1)
graph = new EGraph();
var frame = new StarShapeFrame(); (2)
var elem = new PointElement("State", "Quantity");
frame.setFields(["m1", "m2", "m3"]); (3)
elem.setShapeFrame(frame); (4)
graph.addElement(elem);
| 1 | See dataset to use a data block instead of an array literal. |
| 2 | Create the MultiShapeFrame object. |
| 3 | Use setFields to specify the fields for the MultiShapeFrame. |
| 4 | Use GraphElement.setShapeFrame(frame) to add the MultiShapeFrame to the PointElement. |

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.
|