I have a rendered Highcharts chart on a website and I need to empty it after a certain time. Now I tried that with such code but the chart doesn’t empty itself/nothing changes…
var chart = new Highcharts.Chart({
// Chart settings
});
// Some other JS
function emptyChart(chart) {
chart.series = [];
chart.redraw();
}
// Some code and a function executes this function after some time
emptyChart(chart);
I also don’t get any error in the Firebug console or somewhere else, just nothing happens…
I had this problem already a second time and now I finally found a simple but currently only-working solution: Just create a new, empty Highchart: