DataSet.setOrder(dim,arr)

Set a manual label ordering for a given dimension field.

Parameters

dim String giving name of the dimension to sort

arr Array of strings with desired label order:

['label1','label2','label3',...]

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"],["NJ", 200],["NY", 300],["PA", 25]];

dataset.setOrder('State',['PA','NY','NJ']);

graph = new EGraph();

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

graph.addElement(elem);

 

See Also

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

DataSet.getData(column,row), to retrieve data from the DataSet object.

<< DataSet.getColCount() © 1996-2013 InetSoft Technology Corporation (v11.4) CR.4.4 EGraph >>