title: How do I return y coordinate of a path in d3.js?
body: <p>I have a graph, and I want the line representing the graph to show a circle at the x coordinate when hovering on top of the svg area. This circle should follow the path of the line that represents the curve. The problem is that I don't know how to do this.</p>
  
  <p>The code below shows how far I have succeded, and it indeed adds a circle to the document at the right x coordinate. Now, what do I replace the question mark with?</p>
  
  <pre><code>    svg.on("mousemove", function() {
          d3.select("path.line")
            .style("stroke-width", "2.5px");
  
           svg.append("svg:circle")
              .attr("cx", Math.floor(event.offsetX-m[1]))
              .attr("cy", ?)
              .attr("r", "10")
              .attr("fill", "red");
      });
  </code></pre>