Open codegastudio opened 7 years ago
I'm doing i this way. First of all, I need to create AmChart in ngAfterViewInit
public ngAfterViewInit(): void {
this.chart = this.AmCharts.makeChart('chartReturnDrawdown', this.options);
}
Then wherever you need to call this.AmCharts.updateChart, AmCharts is a injected service in constructor
constructor (private AmCharts: AmChartsService) {}
...
this.AmCharts.updateChart(this.chart, () => {
this.chart.dataSets[ 0 ].dataProvider = [your data here];
})
...
Hope this helps
Hello,
I use your library to display many chart. Update data in serial chart work like you have described by updating chart config and inject new config in graph. Unfortunately, this same process not working when i want change dataProvider in dataSets