score:1

First off, I know NOTHING about highcharts, but it would seem you need: (from your actual page)

function drawDefaultChart() {
$("#container").empty();
    chart = new Highcharts.Chart(defaultOptions);
}

to be

function drawDefaultChart() {
    $("#container").empty().highcharts(defaultOptions);
}

OR perhaps:

function drawDefaultChart() {
    $("#container").highcharts(defaultOptions);
}

score:6

Always it's recommend to refer API documentation.

use following snippet to destroy the chart $('#container').highcharts().destroy();

Click here for a working solution.


Related Query

More Query from same tag