InetSoft Product Documentation: Dashboard JavaScript

EGraph.setXTitleSpec(spec)

Specifies the X-axis title information for X-axis below the chart.

Parameter
 spec
 a TitleSpec object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var spec = new TitleSpec();
 spec.setLabel("X Title")
 graph.setXTitleSpec(spec);
 graph.addElement(elem);
view demo icon
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.

EGraph.setX2TitleSpec(spec)

Specifies the X-axis title information for X-axis above the chart.

Parameter
 spec
 a TitleSpec object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var spec = new TitleSpec();
 spec.setLabel("X Title")
 graph.setX2TitleSpec(spec);
 graph.addElement(elem);
view gallery
View live interactive examples in InetSoft's dashboard and visualization gallery.

EGraph.setYTitleSpec(spec)

Specifies the Y-axis title information for Y-axis to left of chart.

Parameters
 spec
 a TitleSpec object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var spec = new TitleSpec();
 spec.setLabel("Y Title")
 graph.setYTitleSpec(spec);
 graph.addElement(elem);
demo
Learn about InetSoft's key differentiator: cloud flexibility.

EGraph.setY2TitleSpec(spec)

Specifies the Y-axis title information for Y-axis to right of chart.

Parameters
 spec
 a TitleSpec object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var spec = new TitleSpec();
 spec.setLabel("Y Title")
 graph.setY2TitleSpec(spec);
 graph.addElement(elem);
Previous: Graph JavaScript