Using HighCharts I want to delete all of the points from a series, so that I can add a new dataset. Is there a better approach than looping through all of the points, and removing them one by one like this?:
for(var i=0; i < chart.series[0].points.length; i++){
chart.series[0].points[i].remove()
}
I have also seen references to ways of removing the entire series chart.series[0].remove();
This seems quicker to remove the points, but I don't understand how to create an empty series with the same properties and name that points can be added to, which is why I chose to delete the points.