🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all hot features!
Get Free Trial

Using on data source to update multiple pivot tables and charts

Cedric Gaines asked on January 8, 2020

I’m now evaluating the flexmonster control for a big upcoming project.
I love what i’m seeing thus far but do have a question…
Is it possible to have one pivot “Source” and when I update it (add filters and such) I can have a grid and chart(s) update according to my updated “Source”.  I looked over the documentation and saw the global docs, but didn’t see how to use it at the moment to accomplish what i want. (again, i’m just starting looking into this so forgive me if it was covered in the docs and I somehow just missed it.)

3 answers

Mykhailo Halaida Mykhailo Halaida Flexmonster January 9, 2020

Hi Cedric,
Thank you for reaching out to us.
Currently, it is not possible to share the input data from one instance of the pivot table to another. Therefore, if you have multiple pivot table instances on one page, each of them has to load the data separately, even if it comes from the same file.
What we can suggest instead is to define your data in JSON format right in the code and pass it into the report for each instance of the pivot:

var jsonData = [
... data ...

var pivot = new Flexmonster({
... properties ...
report: {
dataSource: {
data: jsonData

Unlike the data itself, the field list and filters of one pivot table instance can be configured to depend on their counterparts in another instance. This can be achieved by using Flexmonster events.
For example, the reportcomplete event can be used to update the slice of one pivot table instance when the other one’s report is updated:

pivot.on('reportcomplete', function () {
var report = pivot2.getReport();
report.slice = pivot.getReport().slice;

For more information on Flexmonster events feel free to check out the corresponding documentation page & our events examples.
Also, please note that the global object you’ve mentioned is used for different purposes. More specifically, it overrides the default report configurations of the component, which are used when any specific property of the report object is not set. You can find some examples of using the global object on this page.
On a final note, we thought you might be interested in how Flexmonster can be integrated with 3rd party charting libraries. Flexmonster supports integration with Highcharts, FusionCharts, Google Charts and many others, all of which are synchronized with the input data and respond to the changes in real-time. For more info on integration with charting libraries check out the following link.
Please let us know if this helps.
Best regards,

Cedric Gaines January 9, 2020

would that work if i’m using microsoft analysis services data via a msmdpump.dll url?

Mykhailo Halaida Mykhailo Halaida Flexmonster January 10, 2020

Hi Cedric,
Kindly note that the described data loading approach only works with the JSON data source.
The rest of the described functionality (e.g. events & integration with charting libraries) does not depend on the data source and works with Microsoft Analysis Services as well.
Please let us know if you have any other questions we can help you with.
Best regards,

Please login or Register to Submit Answer