I have four different HighChart spline charts. All contain six series representing the six New England states. I want to click any legend and hide/show that series in all charts. I have tried legendclickitem but cannot get it to effect both charts. Is what i am asking possible, if so can you point me in the right direction, thanks.
Answer:
Using Paweł FusIn code and in order to keep a legend on each chart I used the following code. You can click on any legend item and it updates all charts.
plotOptions: {
series: {
events: {
legendItemClick: function(event) {
if (this.visible) {
$('#container1').highcharts().series[this.index].hide();
$('#container2').highcharts().series[this.index].hide();
$('#container3').highcharts().series[this.index].hide();
$('#container4').highcharts().series[this.index].hide();
}
else {
$('#container1').highcharts().series[this.index].show();
$('#container2').highcharts().series[this.index].show();
$('#container3').highcharts().series[this.index].show();
$('#container4').highcharts().series[this.index].show();
}
return false;
}
}
}