title: d3.js: How to add labels to scatter points on graph
body: <p>I am trying to add labels to the scatter points on this graph: <a href="http://bost.ocks.org/mike/d3/workshop/dot-chart.html" rel="noreferrer">http://bost.ocks.org/mike/d3/workshop/dot-chart.html</a></p>
  
  <p>I thought that modifying this code a little bit would work, but it didn't:</p>
  
  <pre><code>svg.selectAll(".dot")
    .append("text")
    .text("fooLabelsOfScatterPoints");
  </code></pre>