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


Related Query

More Query from same tag