title: Hide a category when a series name has no value attributed to it highchart
body: <p>I have simplified my graph below for demo purposes but i have a lot of categories but not all series names will have a value of those categories. So when i select that series name how would i go about making 0 value categories disappear.</p>
  
  <p>For example below when selecting person 1 the service 1 category should disappear instead of remain with no bars for it </p>
  
  <pre><code>Highcharts.chart('container', {
  chart : {type: 'column'},
  
  xAxis: {
      categories: ["service1", "service2", "service3", "service"] ,
      showEmpty : true ,
      ordinal: false
      },
  
  series: [{
      name: 'person1',
      data: [0,2,3],
  
      },
  {   name : 'person2',
          data: [10,6,5]
  }]
  });
  </code></pre>
  
  <p>link to the code <a href="https://jsfiddle.net/uroepk1j/" rel="nofollow noreferrer">https://jsfiddle.net/uroepk1j/</a></p>
  
  <p><strong>ppotaczek's Code from JSFiddle</strong> </p>
  
  <pre><code>Highcharts.chart('container', {
  chart: {
      type: 'column',
      ignoreHiddenSeries: true
  },
  plotOptions: {
      column: {
  
          pointPlacement: null,
          events: {
              legendItemClick: function() {
                  var points = this.data,
                      hideCategory = false,
                      breaks = [],
                      stop,
                      series = this.chart.series;
  
                  this.chart.xAxis[0].update({
                      breaks: []
                  });
  
                  this.visible = !this.visible;
  
                  points.forEach(function(p, i) {
                      stop = false;
  
                      series.forEach(function(s) {
  
                          if (!stop &amp;&amp; (!s.visible || s.data[i].y === 0)) {
                              hideCategory = true;
                          } else {
                              stop = true;
                              hideCategory = false;
                          }
                      }, this);
  
                      if (hideCategory) {
                          breaks.push({
                              from: i - 0.5,
                              to: i + 0.5,
                              breakSize: 0
                          })
                      }
  
                      hideCategory = false;
                  }, this);
  
                  this.visible = !this.visible;
  
                  this.chart.xAxis[0].update({
                      breaks: breaks
                  });
              }
          }
      },
  },
  xAxis: {
      categories: ['Col 1', 'Col 2', 'Col 3']
  },
  series: [{
          name: 'person1',
          data: [2, 0, 3],
  
      },
      {
          name: 'person2',
          data: [10, 1, 5]
      }
  ]
  });
  </code></pre>
  
  <p>Thanks for your help</p>