fixed es5 compatibility

This commit is contained in:
piratefinn 2017-12-15 17:38:59 +00:00
parent e16cf3e801
commit 728f9e3d47
2 changed files with 4 additions and 5 deletions

View file

@ -29,7 +29,7 @@ export class PiePanel implements OnInit {
}
private setData(data: any) {
this.doughnutChartData = Object.values(data);
this.doughnutChartData = Object.keys(data).map(key => data[key]);
// setTimeout is currently a workaround for ng2-charts labels
setTimeout(() => this.doughnutChartLabels = Object.keys(data), 0);
}