highcharts 图例全选按钮方法

 $('#uncheckAll').click(function(){ var chart = $('#container').highcharts(); var series = chart.series; for(i=0; i < chart.series.length; i++) { series[i].setVisible(false, false); } chart.redraw(); }); $('#checkAll').click(function(){ var chart = $('#container').highcharts(); var series = chart.series; for(i=0; i < chart.series.length; i++) { series[i].setVisible(true, true); } chart.redraw(); });

你可能感兴趣的:(highcharts 图例全选按钮方法)