SchemaElement
The SchemaElement object contains user-defined visual elements that can be added to the graph. To create a new SchemaElement object, call the SchemaElement constructor.
var elem = new SchemaElement("State", "Quantity");
You can pass a set of field names (e.g., 'State', 'Quantity') to the constructor, or specify these later using the addDim() and addVar() methods.
Example (Report or Viewsheet)
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.schema)
var arr = [["State","Hi","Upper","Median","Lower","Lo"],
["NJ", 200, 180, 150, 120, 100],
["NJ", 220, 170, 140, 110, 105],
["NY", 300, 250, 230, 150, 80]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new SchemaElement();
elem.addDim("State")
elem.addSchema("Hi","Upper","Median","Lower","Lo")
elem.setPainter(new BoxPainter());
graph.addElement(elem);