score:11

Accepted answer

the issue here is that highcharts is redrawing the chart after every series change. i checked the api to see if there was a param you could pass to defer that, but that doesn't appear to be the case.

instead, you can stub out the redraw method until you are ready, like so:

var _redraw = chart.redraw;
chart.redraw = function(){};

//do work

chart.redraw = _redraw;
chart.redraw();

check out the full example here. for me, it was about 10 times faster to do it this way.

score:5

rather than calling show() or hide() for each series, call setvisible(/* true or false here */, false);. this second parameter is the redraw parameter, and you can avoid causing a redraw (which is slow) for each series.

then, after you're done changing visibilities, call chart.redraw() once.

http://api.highcharts.com/highcharts#series.setvisible


Related Query

More Query from same tag