如何隐藏在highcharts所有系列在同一时间(How can i hide all the Se

2019-09-15 15:35发布

我想隐藏在同一时间所有系列的,到现在我在time..is有另一种方式使用$。每个隐藏所有系列逐一但降低我想表现隐藏所有..? 我曾试图这个..

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

Answer 1:

取而代之的.hide使用.setVisible(false, false) 。 这不会触发隐藏每次手术后重绘。

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

见小提琴 。



文章来源: How can i hide all the Series in highcharts at a time