Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

Data not binding to PivotTable in Angular

Answered
Naidu Naidu asked on June 26, 2020

getReportData()
  {
    let infoJSON;
    infoJSON=  this.http.get(‘ourApiUrl’).subscribe(data => {
       console.log(data)
        
      });
      return infoJSON
    
  }
 
binding the above method to Pivot as below 
 
  public pivotReport = {
dataSource: {
    dataSourceType: “json”,
    data:this.getReportData()
}
..
…
…..
  };
 
HTML:
<fm-pivot #pivot 
[toolbar]=”true” 
[width]=”‘100%'” 
[height]=”500″ 
  [report]=”pivotReport”
  [customizeCell]=”onCustomizeCell”
  (ready)=”onPivotReady($event)”
  (beforetoolbarcreated)=”customizeToolbar($event)”>
</fm-pivot>
 
Showing an issue invalid JSON format with popup 
 

1 answer

Public
Mykhailo Halaida Mykhailo Halaida ⋅ Flexmonster ⋅ June 30, 2020

Hi Naidu,
 
Thank you for posting your question.
 
It would be really helpful for our further investigation if you could provide us with a JSON sample of the data that you are sending to Angular from your backend – this will help us understand the core of the issue better.
 
Looking forward to your response.
 
Best regards,
Mykhailo

Please sign in or register to submit your answer