title: d3 data index stuck on zero
body: <p>The following code prints 10 zeros (0) to the console when I run it. I am expecting 0,1,2,3...</p>
  
  <pre><code>var data = [{"id":1,"adjX":-1,"adjY":-1,"weight":1},
  {"id":2,"adjX":-2,"adjY":0,"weight":1},
  {"id":3,"adjX":0,"adjY":2,"weight":2},
  {"id":4,"adjX":3,"adjY":-1,"weight":3},
  {"id":5,"adjX":-2,"adjY":-6,"weight":5},
  {"id":6,"adjX":-10,"adjY":-2,"weight":8},
  {"id":7,"adjX":3,"adjY":15,"weight":13},
  {"id":8,"adjX":24,"adjY":-6,"weight":21},
  {"id":9,"adjX":-10,"adjY":-40,"weight":34},
  {"id":10,"adjX":-63,"adjY":15,"weight":55}]
  
  .
  .
  
  svg.selectAll("line")
      .data(data)
      .enter().append("line")
      .attr("x1", function(d,i){
          console.log(i);
              return varX+(i*5);
           })
      .attr("y1", function(d,i){return varY+(i*5);})
      .attr("x2", function(d,i){return varX+(i*10);})
      .attr("y2", function(d,i){return varY+(i*10);});
  </code></pre>
  
  <p>Why? Help, please :)</p>