DataSet.setOrder(dim, arr)

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

Set a manual label ordering for a given dimension field.

Parameters

dim

Name of the dimension to sort

arr

Array of strings with desired label order:

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

Example

Chart Component Script
dataset = [["State", "Quantity"],["NJ", 200],["NY", 300],["PA", 25]];
dataset.setOrder('State',['PA','NY','NJ']); (1)
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
graph.addElement(elem);
1 Sort the 'State' field in the specified order.

datasetsetOrder

Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.