I want to only show one series at a time. Also I want to disable the option to show no series at all.
I found this: http://forum.highcharts.com/viewtopic.php?f=9&t=6399 But the answer does not work.
The problem was using outdated Highcharts url and old version of jQuery. To disable possibility for hiding series use legendItemClick. See: http://jsfiddle.net/tK38J/65/
plotOptions: {
series: {
events: {
show: function () {
var chart = this.chart,
series = chart.series,
i = series.length,
otherSeries;
while (i--) {
otherSeries = series[i];
if (otherSeries != this && otherSeries.visible) {
otherSeries.hide();
}
}
},
legendItemClick: function () {
if (this.visible) {
return false;
}
}
}
}
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With