Say I have a path I created with d3 something like:
path
d3
line = d3.line() .curve(d3.curveLinear) .x(function(d) { return x(d.x)
You should have a look at this page and this github
.attrTween('d', function () { return d3.interpolatePath(line(data), line(data2)); });
Have a look at this fiddle