How to continuously update data for large pivot table?

Answered
Simon asked on May 22, 2019

The problem I’m trying to solve is this:
We have a large(ish) dataset (~3000 rows by 10 columns). We would like to update this data every 30 seconds or so, whilst keeping the pivot-table as responsive as possible and in the foreground. (i.e. no “updating…” pop-ups)
 
My basic question is “What is the best way to achieve a continuous update of the data without pop-ups?”
 
I’m currently using the pivot-container with a JSON compressor (running in node.js) to supply the data.
I’ve tried a two possible solutions to this:
Approach 1 – Update all the data in one go:
This uses a javascript timer to update the data for the table like this:

window.setInterval(function(){
flexmonster.updateData(
{
dataSourceType: "ocsv",
filename: json_url
});
}, 30000);

This would be acceptable, apart from every time it updates I get the “Analyzing data…” pop-up and the grid dims.

  • Is it possible to stop the “Analyzing data..” pop up? – this would probably work best for us.

 
Approach 2 – Update the data a few rows at a time:
To avoid updating large amounts of data, I was trying to use the ‘partial’ update approach to only update a smaller number of rows each time with:

window.setInterval(function(){
flexmonster.updateData(
{
dataSourceType: "ocsv",
filename: json_url
},
{partial: true}
);
}, 30000);

I can get this to work with the simple example with the JSON data in the script, but it fails when I try to use the data-compressor to supply the data with the following error message:

flexmonster.js:9 Uncaught TypeError: this.jl.Rc is not a function
at a6.Rc (flexmonster.js:9)
at g2.Ina (flexmonster.js:9)
at N72.Rc (flexmonster.js:9)
at M8.Rc (flexmonster.js:9)
at Object.P5.updateData (flexmonster.js:9)
at scripts.js:78
  • Do you know what’s going wrong here?

Thanks,
Simon.

1 answer

Public
Vera Didenko Flexmonster May 23, 2019

Hello, Simon,
 
Thank you for posting your question here.
 
We would like to point out that:
 
1) Flexmonster doesn’t provide an option to hide the “Analysing data…” pop-up because while it is shown the data is being processed by the component and this is the reason we cannot display the data.
 
2) The partial data update option is foreseen only for JSON data (not passed through the Data Compressor). 
 
The recommended approach for this case is to use just JSON (without the Data Compressor) and the partial update option.
 
Please let us know if you have further questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer