Dear visitor, despite the COVID-19 outbreak, our team continues operating at full speed.

Also, here is the form where you can apply for a special discount and we will contact you with possible options. Stay safe and continue achieving your business goals.

Fill the form
Get Free Trial
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