I'm trying to draw a line based on a few points that come with the help of a setinterval, I'm passing the points one at a time but I could also pass several. for now I want the points of the line to be drawn one at a time but without re-drawing those that have already been drawn. How can I solve this problem ?
http://plnkr.co/edit/JjIiqrf97Y8K7YUJRodo?p=preview
var path=g.selectAll(".line1")
.data(data)
.enter()
.append("path")
.attr("class", "line1")
.attr("d", function(d,i) { return (line(data)); })
.style("stroke", function(d) { return "brown" });
in my real problem, I will receive points in real time that is why I
am practicing how to draw point to point and generate an animation
https://i.stack.imgur.com/Xr5Lv.jpg