Select/Deselect all series
![](https://secure.gravatar.com/avatar/13b0b06a0cfcf0df5cb7ca5d4c2d497d?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Stephan Brugger commented
I did it this way:
function callback(chart){
var text = chart.renderer.text('Hide / Show all', xPos, yPos);
text.add() ;
text.css({
'cursor':'pointer',
'color': '#3E576F'
});
text.on('click',function(){
for(var i = 0; i < chart.series.length; i++) {
var series = chart.series[i];
if (series.visible) {
series.hide();
} else {
series.show();
}
}
});
} -
Do we need specific methods for this? It doesn't require much code to loop over chart.series and select or deselect all of them with the current API.