GraphForm.setMeasure(col)

Specifies the measure for which the form should be displayed. If the chart contains a measure of this name, the form object is displayed. Otherwise it is not displayed. This is useful for FacetCoord charts, when the form should be displayed only for the chart that represents a particular measure.

Type

col name of a column (String)

Note: Script that modifies 'graph' should be placed at the element level. See Adding Element-Level Script in Report Scripting and Adding Component Script in Dashboard Scripting for more information.

Example (Report or Viewsheet)

dataset = [["State", "Quantity", "Sales"], ["NJ", 200, 800], ["NY", 300, 600]];

graph = new EGraph();

var elem = new IntervalElement("State", "Quantity");

var elem2 = new IntervalElement("State", "Sales");

var form = new LabelForm();

form.setValues(['NJ',200]);

form.setLabel("NJ Sales");

form.setAlignmentX(Chart.CENTER_ALIGNMENT);

form.setMeasure("Sales");

graph.addForm(form);

var scale = new CategoricalScale("State");

var qscale = new LinearScale("Quantity");

var sscale = new LinearScale("Sales");

var qcoord = new RectCoord(scale, qscale);

var scoord = new RectCoord(scale, sscale);

var facet = new FacetCoord();

facet.setInnerCoordinates([qcoord, scoord]);

graph.setCoordinate(facet);

graph.addElement(elem);

graph.addElement(elem2);

 

See Also

DataSet, to use a Data Block or query as the dataset source.

<< GraphForm.setLine(value) © 1996-2013 InetSoft Technology Corporation (v11.5) GraphForm.setXOffset(value) >>