SchemaElement.addSchema(col)
Specifies the SchemaPainter object to be used in drawing the visual chart elements.
Example
Chart Component Script
dataset = [["State", "Hi", "Lo", "Open", "Close"],["NJ", 200, 100, 120, 150],
["NY", 300, 100, 200, 120]]; (1)
graph = new EGraph();
var elem = new SchemaElement(); (2)
elem.addDim("State");
elem.addSchema("Hi", "Close", "Lo");
elem.setPainter(new StockPainter()); (3)
graph.addElement(elem); (4)
| 1 | See dataset to use a data block instead of an array literal. |
| 2 | Create the SchemaElement object. |
| 3 | Use setPainter to choose the SchemaPainter. |
| 4 | Use EGraph.addElement(elem) to add the SchemaElement to the Chart. |

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