Get Free Trial

Integration with third party charting library – not returning filtered data

Vojtěch asked on May 3, 2021

Hi Flexmonster team, I would like to ask if there is maybe an issue with data retrieval for integration with charting libraries.
We have followed the guide:
but we were unbale to get it working properly. The problem is, that when the slice is defined, the returned data always contains original data without any filtering. E.g.: If I filter out a country, the chart always contains all countries.
It looks like the jsfiddle has also this problem:
On the other hand, when we were working with the webdatarocks library before the flexmonster, this issue was not present:
Here the filtering works as expected.
Thank you very much
BR Vojto

2 answers

Milena Pechura Milena Pechura Flexmonster May 5, 2021

Thank you for posting to our forum.
We would like to kindly explain the behavior of the example you sent.
Please have a look at the 45 line: the slice object is specified in the options parameter of pivot.getData(). This slice will be shown on the chart even when some changes have been made to the grid. If options.slice is not defined, the slice passed to the charts will be the one currently displayed in the pivot table.
Therefore, we suggest removing the slice object from the options:


Speaking about WebDataRocks, the behavior of this library in the discussed case was a bug that we fixed in the Flexmonster component. With the options.slice parameter, Flexmonster provides an opportunity to display different slices in pivot and charts.
Please let us know if the suggested approach would work for you.
Looking forward to your response.
Best regards,

Vojtěch May 5, 2021

Hi Milena,
Thank you very much for your answer. Yes, it looks like we could work with that.
We were thinking that that may be the issue, that declaring the slice object would mean, that we would always get the data as declared in the slice 🙂
BR and thanks again

Please login or Register to Submit Answer