IntervalElement.addInterval(lower,upper)

Adds a “floating” interval element (bar) with lower and upper values specified by the parameters.

Parameters

lower

Name of field defining lower values (String)

upper

Name of field defining upper values (String)

Example

Chart Component Script
dataset = [["Student","Bottom Score","Top Score"],["Joe",70,80],
["Eric",50,90],["Jane",90,100], ["Sue",40,45]]; (1)
graph = new EGraph();
var elem = new IntervalElement(); (2)
elem.addDim("Student");
elem.addInterval("Bottom Score","Top Score"); (3)
graph.addElement(elem); (4)
1 See dataset to use a data block instead of an array literal.
2 Create the IntervalElement object.
3 Use addInterval to assign measures to the interval element.
4 Use EGraph.addElement(elem) to add the IntervalElement to the Chart.

IntervalElementaddInterval

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.