我怎样才能隐藏所有的系列图? [英] How can i hide all the Series in highcharts at a time
本文介绍了我怎样才能隐藏所有的系列图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想一次隐藏所有系列,直到现在我用$。每个系列一个一个地隐藏所有系列,但是这会降低我想隐藏所有的表现。..有另一种方式..?
i已经尝试过了。
$。each(series,function(index,series1){
series1.hide();
});
解决方案
.setVisible(false,false)
。这不会触发每次隐藏操作后重新绘制。
$(chart.series).each(function(){
//this.hide();
this.setVisible(false,false);
});
chart.redraw();
请参阅小提琴 a>。
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();
});
解决方案
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.
这篇关于我怎样才能隐藏所有的系列图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文