Get Free Trial

Update data in run time

PLEASE NOTE: Since we update Flexmonster Pivot with new features biweekly, the information might become outdated. Please check our latest news.

Flexmonster pivot table component is a convenient tool for data analysis and visualization. It offers fast pivot grid control, built-in pivot charts, integration with 3rd party charting libraries. Moreover, the application can have more than one instance of the component. That allows creating a dashboard view with different charts and tables.

Our pivot grid widget can be configured the most convenient way. However, original data may often change. There is no need to reload the whole component. The more efficient approach is supported by updateData() method. This API call allows updating data for the report without cleaning the report configuration. That means you can add or remove some data inside Flexmonster component without the necessity to reload the whole report. The slice, all defined options, number and conditional formatting stay the same. Furthermore, if you scroll down and the component is updated with some new facts, the scroll position will also remain.

For a better understanding, let us analyze how to use updateData() by the following example on JSFiddle. We have the report with defined slice and conditional formatting. Our dataset is stored as inline JSON. Some new records are added to this dataset every 3 seconds. Since we want to display new data immediately, we call updateData() every time our dataset is updated. This method updates data source inside the report when other report parts, such as slice and conditions, remain the same. We can watch how the amount of data grows interactively:

update data pivot grid

For more details about updateData() method please refer to the documentation.

Try this approach to build dynamically updated applications with Flexmonster component!