title: Is there a way to tell crossfilter to treat elements of array as separate records instead of treating whole array as single key?
body: <p>I have data set where some of the field values are arrays and I'd like to use crossfilter and d3.js or dc.js to display histogram of how many times each of those values was present in the dataset.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>var data = [
      {"key":"KEY-1","tags":["tag1", "tag2"]},
      {"key":"KEY-2","tags":["tag2"]},
      {"key":"KEY-3","tags":["tag3", "tag1"]}];
  
  var cf = crossfilter(data);
  
  var tags = cf.dimension(function(d){ return d.tags;});
  var tagsGroup = tags.group();
  
  
  dc.rowChart("#chart")
      .renderLabel(true)
      .dimension(tags)
      .group(tagsGroup)
      .xAxis().ticks(3);
  
  dc.renderAll();
  </code></pre>
  
  <p>And JSFiddle <a href="http://jsfiddle.net/uhXf5/2/" rel="noreferrer">http://jsfiddle.net/uhXf5/2/</a></p>
  
  <p>When I run that code it produces graph like this:</p>
  
  <p><img src="https://i.stack.imgur.com/lbWJ0.png" alt="graph1"></p>
  
  <p>But what I want is something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Gosd0.png" alt="enter image description here"></p>
  
  <p>To make things even more complicated it would be awesome to be able to click on any of the rows and filter dataset by the tag that was clicked.</p>
  
  <p>Anyone has any ideas how to achieve that?</p>
  
  <p>Thanks,
  Kostya</p>