Documentation menu
Introduction
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 cell formatting. |
| Data Source Object | Contains the information about the data source. |
| Format Object | Defines a custom format for numeric cells. |
| Global Object | Contains configurations that will be applied to all reports. |
| 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. |
| Table Sizes Object | Stores size settings for columns and rows. |
Methods
| collapseAllData | Collapses all nodes and drills up all levels of all hierarchies. |
| customizeCell | Allows changing the content and style of separate cells. |
| expandAllData | Expands all nodes and drills down all levels of all hierarchies. |
| exportTo | Exports the content from the grid to a file of the chosen format. |
| getAllConditions | Returns a list of conditional formatting rules from the current report. |
| getAllHierarchies | Returns a list of available hierarchies from the current report. |
| getAllMeasures | Returns a list of available measures (both active and inactive) from the current report. |
| getOptions | Returns an Options Object from a pivot table. |
| getReport | Returns a Report Object from a pivot table. |
| getCell | Returns information about the cell by its row and column indices. |
| getSelectedCell | Returns information about the structure of the cell selected on the grid. |
| getData | Returns the data from a pivot table. Use it for integration with 3rd party charting libraries. |
| 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. |
| 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. |
| load | Loads a report JSON file from the specified URL to a pivot table. |
| off | Removes event handlers from the events. |
| on | Attaches an event handler to the specified event. |
| refresh | Redraws a component. Use it to see the applied changes to a report. |
| removeSelection | Clears selection from the cells. |
| runQuery | Runs a query on a pivot table instance. |
| 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. |
| cellclick | Triggered once a user clicks the cell on the grid. |
| celldoubleclick | Triggered once a user double clicks the cell on the grid. |
| dataloaded | Triggered when the data is loaded into the pivot table. |
| 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. |