Hi,
Our Angular application is getting data updates in intervals. We're taking api data and converting it a Highcharts.Chart object so it can be displayed on the chart correctly. It seems that on subsequent api requests, the previous data still exists on the chart.
For instance, response A comes in as
responseA {
a: [1,2,3,4]
b: [1,2,3,4]
c: [1,2,3,4]
}
And then response B comes in
responseB {
a: [1,2,3,4]
}
When I update the Highcharts.Options with responseB, the properties b and c still exist on the chart.
From my various reading, the best way to handle this is to clear the original series (chart.series.remove()) upon a data update and then reconfig the new options object. The other option I've come across is redrawing a completely new chart using the new data.
Are there any other ways to update the series on a data refresh?