Using latest HighStock/HighCharts we are creating charts with this syntax:
$('#container').highcharts({...
We then allow the user to do some manipulation of the chart series displayed. We added the ability for the user to reset the chart back to how it was originally. We are using this method:
function forceResetChart(chart) {
var opts = chart.options;
chart.destroy();
chart = new Highcharts.Chart(opts);
}
This does reset the chart and we are able to make changes again. However, we are keep getting errors thrown in the console:
TypeError: a.renderTo is undefined @ .../JavaScript/HighStock/highstock.js:198
How can we still use the cleaner syntax ($('#container').highcharts({...
) and not get this error thrown?