title: In d3, how to get the interpolated line data from a SVG line?
body: <p>I display a line chart with D3 with roughly the following code (given the scale functions <code>x</code>, <code>y</code> and the float array <code>data</code>):</p>
  
  <pre><code> var line = d3.svg.line()
           .interpolate("basis")
           .x(function (d, i) { return x(i); })
           .y(function (d) { return y(d); });
   d3.select('.line').attr('d', line(data));
  </code></pre>
  
  <p>Now I want to know the <strong>vertical height of the line at a given horizontal pixel position</strong>. The <code>data</code> array has lesser data points than pixels and the displayed line is <strong>interpolated</strong>, so it is not straight-forward to deduce the height of the line at a given pixel just from the <code>data</code> array.</p>
  
  <p>Any hints?</p>