title: Need explanation about a piece of D3.JS code
body: <p>I am following an example from <a href="http://bl.ocks.org/mbostock/3943967" rel="nofollow noreferrer">http://bl.ocks.org/mbostock/3943967</a></p>
  
  <p>I got 1 line not working, I am trying to understand it in order to debug it but I'm struggling.</p>
  
  <pre><code>   y01z = d3.stack().keys(d3.range(n))(d3.transpose(yz))
  </code></pre>
  
  <p>n is always equal to 4 and yz is a array[]</p>
  
  <pre><code>  y01z = d3.stack().keys(d3.range(4))(d3.transpose([]))
  </code></pre>
  
  <p>This is not working either.</p>
  
  <p><a href="https://i.stack.imgur.com/YlTKE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YlTKE.png" alt="enter image description here"></a>
  I just copied and paste the example code and encapsulate all the variables in the object "o", the error was already here before that.</p>
  
  <p>My guess is the example code is maybe not a D3 v4 or just not correct.</p>