Select/Deselect all series

-
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.