I would like to switch to a different measure by clicking a button (API)
Here is the scenario:
Thanks
Paul
Hi Paul,
Thank you for your question. At first you should use getReport() method to get the report object (var report = flexmonster.getReport();). Then you should set measures attribute as you want it to be (report.measures = [{ uniqueName: "Quantity", aggregation: "sum", active: true}, ...];). After that please pass the updated report to the pivot (flexmonster.setReport(report);). The result will look like this https://jsfiddle.net/Uaman23/n7gaLr1w/ .
Let us know if it fits your need.
Best regards,
Dmytro.
Hello Paul and all Flexmonster users,
Please note that report structure was changed in version 2.3. Read more about new structure: Report Object. Here is an updated sample: https://jsfiddle.net/flexmonster/8d5on276/
Regards,
Tanya