title: Using d3 how to pass multiple row data
body: <p>I have some code that looks like this:</p>
  
  <pre><code>var row = 4;
  var col = 4;
  var stack = d3.layout.stack();
  var layers = stack( d3.range(row).map(function() {
      return CmcLayer(col); 
  }));
  
  function CmcLayer(col) {
      var a = [1, 2, 3, 4];
      return a.map(function(d, i) { return {x: i, y: d}; });
  }
  </code></pre>
  
  <p>Optimally I'd like to pass in data that looks like this, or similar to this:</p>
  
  <pre><code>var a = [[1, 2, 3, 4], 
           [4, 3, 2, 1],
           [1, 2, 3, 4],
           [4, 3, 2, 1]];
  </code></pre>
  
  <p>What do I have to change so it will accept multiple rows?</p>