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 ObjectContains the information about the cell.
Conditional Format ObjectDefines the conditions for cell formatting.
Data Source ObjectContains the information about the data source.
Format ObjectDefines a custom format for numeric cells.
Global ObjectContains configurations that will be applied to all reports.
Options ObjectDefines the view and functionality of the pivot table.
Report ObjectContains all the configurations of the pivot table.
Slice ObjectContains the information about the hierarchies, filtering, sorting, expands, drills and report filtering.

Methods

collapseAllDataCollapses all nodes and drills up all levels of all hierarchies.
customizeCellAllows changing the content and style of separate cells.
expandAllDataExpands all nodes and drills down all levels of all hierarchies.
exportToExports the content from the grid to a file of the chosen format.
getAllConditionsReturns a list of conditional formatting rules from the current report.
getAllHierarchiesReturns a list of available hierarchies from the current report.
getAllMeasuresReturns a list of available measures (both active and inactive) from the current report.
getOptionsReturns an Options Object from a pivot table.
getReportReturns a Report Object from a pivot table.
getCellReturns information about the cell by its row and column indices.
getSelectedCellReturns information about the structure of the cell selected on the grid.
getDataReturns the data from a pivot table. Use it for integration with 3rd party charting libraries.
googlecharts.getDataReturns 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.getDataReturns the data from a pivot table and pre-processes it to the appropriate format of a chart. Use this method for integration with Highcharts.
loadLoads a report JSON file from the specified URL to a pivot table.
offRemoves event handlers from the events.
onAttaches an event handler to the specified event.
refreshRedraws a component. Use it to see the applied changes to a report.
removeSelectionClears selection from the cells.
runQueryRuns a query on a pivot table instance.
saveSaves all current report configurations to the specified destination.
setOptionsSets an Options Object of a pivot table.
setReportSets a Report Object of a pivot table.
updateDataConnects to a new data source dynamically without changing report’s configurations.

Events

beforetoolbarcreatedTriggered before the Toolbar initialization. Use it to override the appearance and functionality of the Toolbar.
cellclickTriggered once a user clicks the cell on the grid.
celldoubleclickTriggered once a user double clicks the cell on the grid.
dataloadedTriggered when the data is loaded into the pivot table.
reportchangeTriggered when a report is changed in a component.
reportcompleteTriggered when a report and a localization file are successfully loaded into a pivot table.
updateTriggered when the changes are applied to a pivot table.