WebDataRocks provides users with an extensive JavaScript API for interaction with a pivot table component.

This API reference covers all the details about a component’s objects, methods and events.

Get started with Init API call to embed WebDataRocks into your project.

Objects

Cell Data Object Contains the information about the cell.
Conditional Format Object Defines the conditions for cells formatting.
Data Source Object Contains the information about the data source.
Format Object Defines a custom format for numeric cells.
Options Object Defines the view and functionality of the pivot table.
Report Object Contains all the configurations of the pivot table.
Slice Object Contains the information about the hierarchies, filtering, sorting, expands, drills and report filtering.

Methods

customizeCell Allows changing the content and style of separate cells.
exportTo Exports the content from the grid to a file of the chosen format.
getOptions Returns an Options Object from a pivot table.
getReport Returns a Report Object from a pivot table.
googlecharts.getData Returns the data from a pivot table and pre-processes it to the appropriate format of a chart. Use this method for integration with Google Charts.
getData Returns the data from a pivot table. Use it for integration with 3rd party charting libraries.
highcharts.getData Returns the data from a pivot table and pre-processes it to the appropriate format of a chart. Use this method for integration with Highcharts.
off Removes event handlers from the events.
on Attaches an event handler to the specified event.
load Loads a report JSON file from the specified URL to a pivot table.
refresh Redraws a component. Use it to see the applied changes to a report.
save Saves all current report configurations to the specified destination.
setOptions Sets an Options Object of a pivot table.
setReport Sets a Report Object of a pivot table.
updateData Connects to a new data source dynamically without changing report’s configurations.

Events

beforetoolbarcreated Triggered before the Toolbar initialization. Use it to override the appearance and functionality of the Toolbar.
reportchange Triggered when a report is changed in a component.
reportcomplete Triggered when a report and a localization file are successfully loaded into a pivot table.
update Triggered when the changes are applied to a pivot table.