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

NameTypeDescription
containerStringAn id of the HTML element where pivot table is rendered.
toolbarBooleanoptional Parameter to embed the Toolbar.
reportReport Object | Stringoptional Property to define which data is shown and other configurations.
widthNumberoptional The width of the pivot table in pixels or percent (100% by default).
heightNumberoptional The height of the pivot table in pixels or percent (500 by default).
customizeCellFunctionoptional Function that renders each cell and can change its content (see how to use).
globalGlobal Objectoptional 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: