Created
March 4, 2016 15:41
-
-
Save Lazhari/b9da3104b05c9e12def0 to your computer and use it in GitHub Desktop.
Toggle Show/Hide Lines for Highcharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plotOptions: { | |
series: { | |
events: { | |
legendItemClick: function(event) { | |
var seriesIndex = this.index; | |
var series = this.chart.series; | |
for (var i = 0; i < series.length; i++) { | |
if (series[i].index !== seriesIndex) { | |
series[i].hide(); | |
} | |
} | |
return true; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment