Accepted answer

1) is this the right way to destroy and rebuild the chart, or is there a better method?

That's the only way and Highcharts is smart enough so that you don't have to worry about any memory leaks.

2) if this is the way to do it, then how do I get my show/hide/check/uncheck functions to continue to work afterward?

You are recreating the chart but not assigning it to the variable chart again.

    chart1 = new Highcharts.Chart(optionsChart1,highlightSer);
    chart = chart1; // <-------- Add this line here.


Is there a reason for assigning the chart to a new variable here?

var chart = chart1;

chart will not point to a graph anymore after you have destroyed it. If you just use chart1, which you re–assign, everything seems to work just fine. Or am I missing something?

Related Query

More Query from same tag