Created
November 12, 2012 11:13
-
-
Save slawekkolodziej/4058747 to your computer and use it in GitHub Desktop.
Connect multiple series visibility in Highcharts
This file contains 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
Highcharts.Series.prototype.toggleConnected = function(visible) { | |
var visibility = visible || !this.visible, | |
series = this.options.connectedSeries, | |
l = series.length, | |
serie; | |
while (l--) { | |
serie = this.chart.get(series[l]); | |
serie.setVisible(visibility, false); | |
serie.checkbox && (serie.checkbox.checked = visibility); | |
} | |
this.setVisible(!visibility); | |
this.checkbox && (this.checkbox.checked = visibility); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment