Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Data not binding to PivotTable in Angular

Answered
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 login or Register to Submit Answer