Hiding _groups_ of series in Highcharts and jQuery: how to get acceptable performance?

前端 未结 2 429
盖世英雄少女心
盖世英雄少女心 2020-12-06 11:01

I\'m using Highcharts to represent groups of time series. So, data points collected from the same individual are connected by lines, and data points from individuals that be

2条回答
  •  旧时难觅i
    2020-12-06 11:29

    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.

提交回复
热议问题