CR.4.2  Table

The Chart's Table object is a two-dimensional array containing the aggregates records (summarized data) bound to a chart. You can use standard array notation, table[i][j], to access the data value in row i and column j. Use table.length and table.size, respectively, to obtain the number of rows and columns in the summarized data.

The values provided by the Table object are the same as those provided by the DataSet object, except that the first row, table[0][j], contains the column headers rather than the first row of data.

For example, consider the following chart bound to the 'All Sales' query.

 

Example

// First row of 'table' has headers: Employee, Sum(Total)

var str = "";

for (var j = 0; j < table.size; j++) {

  str += table[0][j] + ", ";

}

log(str);

Example

// First row of 'dataset' has data: Annie, 4412983.0

var str = "";

for (var j = 0; j < dataset.getColCount(); j++) {

  str += dataset.getData(j,0) + ", ";

}

log(str);

See Also

DataSet, for information on accessing the chart's aggregated dataset.

Data, for information on accessing Chart data with advanced syntax.

<< CR.4.1 Data © 1996-2013 InetSoft Technology Corporation (v11.5) CR.4.3 DataSet >>