Documentation menu
Init API call
WebDataRocks reporting tool is embedded using new WebDataRocks()
API call.
new WebDataRocks({
container: String,
toolbar: Boolean,
report: Report Object | String,
width: Number,
height: Number,
customizeCell: Function,
global: Global Object
})
To embed WebDataRocks in the simplest configuration, return to the Quick start tutorial.
Parameters
Name | Type | Description |
---|---|---|
container | String | An id of the HTML element where pivot table is rendered. |
toolbar | Boolean | optional Parameter to embed the Toolbar. |
report | Report Object | String | optional Property to define which data is shown and other configurations. |
width | Number | optional The width of the pivot table in pixels or percent (100% by default). |
height | Number | optional The height of the pivot table in pixels or percent (500 by default). |
customizeCell | Function | optional Function that renders each cell and can change its content (see how to use). |
global | Global Object | optional Property to set default configurations for all reports. |
You can also specify event handlers as initialization parameters. See the full list of events and try a live demo on CodePen.
Returns
The reference to the WebDataRocks object. API calls can be used via this object.
Example
Embed WebDataRocks reporting tool with the Toolbar: