d3.line(data)
returns a path data string. But, If I understand correctly, d3.line(data).context(context)
draws directly the line on the canvas.
How can I get the array of points used to draw the line on the canvas?
And, is it possible to change the preciseness of the line resulting from d3.line().curve()
by passing the number of desired points?
Here is what I want to achieve:
makeACurvedLine([p1, p2, p3], 6)
And get the array of coordinates of the 6 points from the smoothed line.
What is the best way to achieve it?