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
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