score:1
Accepted answer
You can link series with the same visibility and hide the other ones in legendItemClick
event:
plotOptions: {
series: {
events: {
legendItemClick: function() {
if (this.visible) {
return false;
}
this.chart.series.forEach(function(s) {
if (s !== this && s !== this.linkedSeries[0]) {
s.hide();
}
}, this);
}
}
}
},
series: [{
data: [...],
id: 'first'
}, {
data: [...],
linkedTo: 'first'
}, {
data: [...],
visible: false,
id: 'third'
}, {
data: [...],
linkedTo: 'third'
}]
Live demo: http://jsfiddle.net/BlackLabel/s6x37azb/
API Reference: https://api.highcharts.com/highcharts/series.line.linkedTo
Source: stackoverflow.com
Related Query
- Highcharts - How show only two series on click
- How to show only one pair of linked Highcharts series at a time
- HIGHCHARTS - Given a series with UNIX stamps and values pairs for the data, how do I show only the date for the first and last point on xAxis?
- How to show only specific x-axis values on datetime axis in Highcharts
- How do I hide a Highcharts series from the chart, but always show it in the tooltip?
- How to show 0 for incomplete Series in Highcharts
- How to add series after click event in HighCharts
- How to connect to end points in two linked series in HighCharts
- Show only some series in HighCharts spline chart
- Show only two axis values in highcharts
- How to show only the last 100 candlesticks or hide the first 50 candlesticks in Highcharts Stock Chart?
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts show two line series with same values
- show two different series with different start intervals with the same xAxis highcharts
- Highcharts - How can I show arrow between two dials of gauge chart?
- Highcharts, chart with two series starting in diferent points, how yo show single column?
- How to Show Same Month name of two years in X axis of Highcharts
- How to dynamically populate Highcharts column chart with two series
- How to render a bar chart with different series with only one entry per category in HighCharts
- Highcharts - How to show two tooltips for single point at different positions of chart?
- How can I show colorAxis color in Highcharts legend as series color?
- How to manually trigger the afterSetExtremes event from a series click event in HighCharts
- How to modify highcharts legend item click event?
- How to show only integer values on yAxis of HighChart?
- How can I hide series from a HighCharts legend?
- How to show No Data Available Message in highcharts
- How can I hide a series from initially being displayed in Highcharts
- Highcharts How to Show Loading Animation At Set Data
- Hiding _groups_ of series in Highcharts and jQuery: how to get acceptable performance?
- how do I get two highcharts on one page?
More Query from same tag
- In a Highcharts gauge graph, how can I position plotband labels centered?
- In Highcharts, zooming a small selection up to the edge, zooms both x and y when zoomtype = x
- Highcharts - master-detail - master with multiple color
- Highcharts Wind rose increase surface bar
- Transfer Multiple Textbox value into Pie Chart slices(Percentage)
- Highcharts columnrange date chart
- Highcharts in Node
- Highcharts drilldown - when useing setData chart doesn't stay drilled down
- HighChart : generate onclick() by for loop to addSeries
- Sync an html5 video with an highchart.js line chart
- Grey out item in Highcharts legend
- angular multiple same directives in single controller
- Create a HighCharts pie chart using JSON Data
- Removing lines between two values in Highchart's line chart
- Format y-axis values using numeral JSHighCharts
- Highcharts Gauge not appearing
- HighCharts Export Server not rendering series marker symbols consistently
- Highstock - click drag on the portion of the graph to zoom?
- Chart not visible
- How do I hide an overflowing Highcharts treemap datalabel?
- Uncaught TypeError: Cannot read property 'mouseIsDown' of undefined
- How to pass parameters to react-highcharts?
- How to set the z-index of points on a HighCharts scatter plot?
- DotNet HighChart not populating
- Add Points Using Javascript/Jquery
- how to customize heatmap highcharts plot area and the color of the datalabels
- Highchart bar pagination
- Combining categories for column chart with Highcharts
- Highcharts problem with decimals if there are many data points
- Highcharts Timeline Renaming Series Labels