Skip to main content
UndefinedNameError: reference to undefined name 'Pentaho' (click for details)
Callstack:
    at (Template:Custom/Views/Header/HeaderMenuGlobalNav), /content/body/pre, line 28, column 64
    at template()
    at (Template:Custom/Views/Header), /content/body/pre[1], line 31, column 12
    at (Documentation/8.0/Developer_Center/JavaScript_API/platform/pentaho.data.Table), /content/body/div/div/div/table[2]/tbody/tr/td/pre/@function, line 1, column 18
Pentaho Documentation

Table

pentaho.data.Table

The Table class implements the ITable interface.

AMD Module

require(["pentaho/data/Table"], function(Table) { /* code goes here */ });

Implements

Constructor

Name Description
new Table(table)

Creates a table given specification of data.

Constructor Details

new Table(table)

Creates a table given specification of data.

Source: doc-js/pentaho/data/Table.jsdoc, line 17

Parameters:
Name Default Value Summary
table : Object
 
Optional

The data specification.

Example

Creating a table from a table specification

require("pentaho/data/Table", function(Table) {

 var table = new Table({
 model: [
 {name: "family", type: "string", label: "Family"},
 {name: "sales", type: "number", label: "Sales"},
 ],
 rows: [
 {c: [{v: "plains", f: "Plains"}, 12300000]},
 {c: [{v: "cars", f: "Cars"}, 456000]}
 ]
 });

 // ...
});