How do I return y coordinate of a path in d3.js?
SVG provides a native function called .getPointAtLength() which returns a the x and y values of a path at any length you pass at it. You would need to iterate through the length of the line until you find the corresponding y position. Here is how you would do it in D3: var svg = … Read more