LineElement
The LineElement object contains the visual elements for a line chart. To create a new LineElement object, call the LineElement constructor.
var elem = new LineElement("State", "Quantity");
You can pass one, two, or three 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)
var arr = [["State", "Quantity"], ["NJ", 100], ["NY", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new LineElement("State", "Quantity")
graph.addElement(elem);