title: nvd3 multiBarChart - legend click events
body: <p>I have a stacked multiBarChart with a legend.</p>
  
  <p>When you disable <strong>all</strong> items via the legend then they all get enabled again. I would like to prevent this from happening and only enable them if a user clicks on an item.</p>
  
  <p>I have been looking through the chart source (link below) but cannot locate where all the items get enabled again. I was thinking that maybe i could override the legendClick dispatch function but it seems this is not getting registered in my own JS (fiddle below)</p>
  
  <pre><code>controls.dispatch.on('legendClick', function(d,i) {
      //Some logic to keep all items disabled here
  }
  </code></pre>
  
  <p><a href="https://jsfiddle.net/s2vemzht/26/" rel="nofollow noreferrer">https://jsfiddle.net/s2vemzht/26/</a></p>
  
  <p><a href="https://github.com/novus/nvd3/blob/master/src/models/multiBarChart.js" rel="nofollow noreferrer">https://github.com/novus/nvd3/blob/master/src/models/multiBarChart.js</a></p>
  
  <p>How can i control what is enabled/disabled on legend click ?</p>
  
  <p><strong>UPDATE: 03/01/2017</strong></p>
  
  <p>I discovered an area in the code nv.d3.js file that sets all series back to enabled. How could I override this behaviour for a particular instance of the chart instead of changing the default behaviour in the source ?</p>
  
  <pre><code>//the default behavior of NVD3 legends is, if every single series
  // is disabled, turn all series' back on.
  data.forEach(function(series) { series.disabled = false});
  </code></pre>
  
  <p><a href="https://github.com/novus/nvd3/blob/f81cd38015ecb4c3a11a161e37a62761276b87ac/build/nv.d3.js#L6433" rel="nofollow noreferrer">https://github.com/novus/nvd3/blob/f81cd38015ecb4c3a11a161e37a62761276b87ac/build/nv.d3.js#L6433</a></p>