title: d3.js loop number as variable for
body: <p>As in the example at <a href="http://bl.ocks.org/cgdnorth/7144137" rel="nofollow">http://bl.ocks.org/cgdnorth/7144137</a>, I am looking to translate each boxplot that is created into the month it corresponds to. I know I can move each of the boxplots in the <code>.attr("transform...</code> when they are created:</p>
  
  <pre><code>svg.selectAll(".box")
                      .data(data)
                      .enter().append("svg")
                      .attr("class", "box")
                      .attr("width", width + margin.left + margin.right)
                      .attr("height", height + margin.bottom + margin.top)
                      .append("g")
                      .attr("transform", "translate(" + margin.left + "," + margin.top + ")") // Need to translate each boxplot by e from data[e] in the csv.foreach
                      .call(chart);
  </code></pre>
  
  <p>I would like to know how I can access the <code>data</code> key value <code>e</code> defined in <code>csv.forEach(function(x) {</code> that cycles through the data so I can multiply by the width of the box like:</p>
  
  <pre><code>svg.selectAll(".box")
                      .data(data)
                      .enter().append("svg")
                      .attr("class", "box")
                      .attr("width", width + margin.left + margin.right)
                      .attr("height", height + margin.bottom + margin.top)
                      .append("g")
                      .attr("transform", "translate(" + (width + margin.left + margin.right)*e + "," + margin.top + ")") // Need to translate each boxplot by e from data[e] in the csv.foreach
                      .call(chart);
  </code></pre>
  
  <p>This would also be the array key that is used to draw each of the box plots.
  Thanks!</p>