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

前端 未结 2 430
盖世英雄少女心
盖世英雄少女心 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条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 11:17

    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

提交回复
热议问题