diff --git a/components/chart/chart.ts b/components/chart/chart.ts index 43bead039a5..01790c25323 100644 --- a/components/chart/chart.ts +++ b/components/chart/chart.ts @@ -41,13 +41,22 @@ export class UIChart implements AfterViewInit, OnDestroy, DoCheck { } ngDoCheck() { - var changes = this.differ.diff(this.data.datasets); - if (changes && this.initialized) { - if(this.chart) { - this.chart.destroy(); + if(this.data && this.data.datasets) { + let changed = false; + for(let i = 0; i < this.data.datasets.length; i++) { + if(this.differ.diff(this.data.datasets[i].data)) { + changed = true; + break; + } } - this.initChart(); + if(changed && this.initialized) { + if(this.chart) { + this.chart.destroy(); + } + + this.initChart(); + } } }