SchemaElement.setPainter(painter)

Specifies the SchemaPainter object to be used in drawing the visual chart elements. The corresponding “getter” function is getPainter().

Parameter

painter

BoxPainter: Box and whiskers plot
CandlePainter: Candle plot
StockPainter: Stock chart

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"); (3)
elem.setPainter(new StockPainter());
graph.addElement(elem); (4)
1 See dataset to use a data block instead of an array literal.
2 Create the SchemaElement object.
3 Use addSchema to add fields to the SchemaElement.
4 Use EGraph.addElement(elem) to add the SchemaElement to the Chart.

SchemaElementsetPainter 1

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.