I have attached the screenshot of console error which im getting when trying to setReport.
Code ->
this.reportData = [
{
"Product Family": {
"type": "string",
"hierarchy": "Product"
},
"Unit Sales": {
"type": "number"
},
"Store Cost": {
"type": "number"
}
},
{
"Product Family": "Drink",
"Unit Sales": 24597
},
{
"Product Family": "Drink",
"Store Cost": 19477.23
},
{
"Product Family": "Food",
"Unit Sales": 191940
},
{
"Product Family": "Food",
"Store Cost": 163270.72
},
{
"Product Family": "Non-Consumable",
"Unit Sales": 50236
},
{
"Product Family": "Non-Consumable",
"Store Cost": 42879.28
}
]
let report: any = this.pivotRef.flexmonster.getReport();
report.options = {
configuratorActive: false
};
report.dataSource.data = this.reportData;
this.pivotRef.flexmonster.setReport(report);
Hello Deepak,
Thank you for reaching out to us.
We could not reproduce the described console error on our side. Could you please send us the code of the whole component (with the definition of Flexmonster)? It would greatly help us.
Also, please note that we recommend setting the data using the updateData
API call instead of setReport
. For more details on React integration, please check the following guide: https://www.flexmonster.com/doc/using-methods-and-events-react/.
Looking forward to hearing from you.
Kind regards,
Nadia
Hi ,
Thank you for the response . Using updateData instead of setReport worked for me.
Hello,
Thank you for the feedback!
We are glad to hear that it works for you.
Do not hesitate to contact us in case other questions arise.
Kind regards,
Nadia