can you please help me to remove the overlap line on my line graph. This is a dynamic graph. So whenever I want to change the scale of my graph to a bigger domain, the whole path should be there. and when i change again the scale to smaller one, I dont want to see the line graph or just see the lines that covers the range of my scale. thanks.
var data = [
{"x":1, "y":1},
....
....
];
var line = d3.svg.line()
.x(function(d) { return xScale(d.x); })
.y(function(d) { return yScale(d.y); });
var path = svg.append("path")
.data([data])
.attr("d", line)
.attr("stroke", "black");
click the link for sample output.