Skip to content Skip to sidebar Skip to footer

How To Hide Series Data In Combination High Charts

I am using combine high charts. I need to hide a particular pie chart and column chart data while clicking a particular legend. If i use: That removes the value but not able to s

Solution 1:

You can use hide method on point SVG graphic element:

    events: {
      legendItemClick: function(e) {
        var index = this.index;
        var chart = this.series.chart;
        var series = chart.series;
        var len = series.length - 1;

        if (this.visible) {
          series[0].points[index].graphic.hide();
        } else {
          series[0].points[index].graphic.show();
        }
      }
    }

Live demo: https://jsfiddle.net/BlackLabel/d8uaxefo/

API Reference: https://api.highcharts.com/class-reference/Highcharts.SVGElement#hide

Post a Comment for "How To Hide Series Data In Combination High Charts"