CR.6.6  TriCoord

TriCoord.setScale(scale)

The TriCoord object contains triangular coordinates against which data can be represented. Although the triangular coordinate system contains three axes, it represents only two independent dimensions, and the three measures must sum to the maximum value of the scale. This makes the triangular coordinates effective for representing proportions of a fixed total.

Note: The three measures must sum to the maximum value of the scale.

To create a TriCoord object, call the TriCoord constructor:

var coord = new TriCoord(qscale);

You can pass a Scale object (e.g., 'qscale') to the constructor, or specify this later using the TriCoord.setScale(scale) property.

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 = [["Quantity","Total","Returns"],[50,50,100],[75,100,25],[100,100,0]];

graph = new EGraph();

var elem = new PointElement();

var qscale = new LinearScale("Quantity");

qscale.setMin(0);

qscale.setMax(200);

var spec = new AxisSpec();

spec.setGridStyle(Chart.DOT_LINE);

qscale.setAxisSpec(spec);

var coord = new TriCoord(qscale);

elem.addDim("Quantity");

elem.addDim("Total");

elem.addVar("Returns");

graph.addElement(elem);

graph.setScale("Quantity", qscale);

graph.setScale("Total", qscale);

graph.setScale("Returns", qscale);

graph.setCoordinate(coord);

 

The first dimension ('Quantity') is represented on the bottom axis, the second dimension ('Total') on the right axis, and the third dimension ('Returns') on the left axis. Note that the third dimension must be added using addVar() rather than addDim().

Full Name

inetsoft.graph.coord.TriCoord

TriCoord: setScale

See Also

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

<< ParallelCoord.setScales(scales) © 1996-2013 InetSoft Technology Corporation (v11.5) TriCoord.setScale(scale) >>