How can i hide all the Series in highcharts at a t

2019-03-27 13:35发布

I want to hide all the series's at a time , till now i use $.each hide all the series one by one but that degrading the performance i want hide all at a time..is there another way..? i had tried this..

$.each(series, function(index, series1) {
    series1.hide();
});

1条回答
Fickle 薄情
2楼-- · 2019-03-27 13:51

Instead of .hide use .setVisible(false, false). This will not trigger a redraw after every hide operation.

$(chart.series).each(function(){
    //this.hide();
    this.setVisible(false, false);
});
chart.redraw();

See fiddle.

查看更多
登录 后发表回答