title: Dot Plot in D3.js
body: <p>I'm interested in creating a <strong>Dot plot</strong> (the one with the consecutive dots for every data value) but what I've managed so far is to create just a single dot for every value. </p>
  
  <p>To be more clear, let's say for the array1 I want for the first value to create 5 circles, for the second 4 circles and so on...</p>
  
  <pre><code>array1 = [5,4,2,0,3] 
  </code></pre>
  
  <p>Any ideas? </p>
  
  <p>Part of my code: </p>
  
  <pre><code>var circle = chart.selectAll("g")
      .data(d)
      .enter()
      .append("g")
      .attr("transform", function(d) { return "translate(" + xScale(d.values) + ",0)"; });
  circle.append("circle")
      .attr("cx", xScale.rangeBand()/2)
      .attr("cy", function(d) { return yScale(d.frequency); })
      .attr("r", 5);
  </code></pre>