angular2-google-chart icon indicating copy to clipboard operation
angular2-google-chart copied to clipboard

Refresh on data change

Open Kishore2Learn opened this issue 8 years ago • 4 comments

Chart was not refreshing wen data changes. I handled ngOnChanges event and it worked. ngOnChanges(){ if(!googleLoaded) { googleLoaded = true; google.charts.load('current', {'packages':['corechart', 'gauge']}); } setTimeout(() =>this.drawGraph(this.chartOptions,this.chartType,this.chartData,this._element),1000); }

Kishore2Learn avatar Feb 22 '17 17:02 Kishore2Learn

+1

Bogdan-Kalynovskyi avatar Mar 08 '17 16:03 Bogdan-Kalynovskyi

I just added ngOnChanges(changes) { if (googleLoaded) { this.drawGraph(this.chartOptions,this.chartType,this.chartData,this._element); } } in angular2-google/directives/angular2-google-chart.directive.ts and imorted OnChanges. Works fine too. Can someone include this in the code?

liquidpizza avatar Apr 04 '17 15:04 liquidpizza

I will do soon. Thanks

vimalaanthony avatar Apr 05 '17 06:04 vimalaanthony

Hi I have updated the above request

vimalaanthony avatar Apr 05 '17 13:04 vimalaanthony