Seeking to grasp the concept of attrTween, I am exploring how to make a square move using this method instead of the simpler attr approach. Despite no errors being displayed in the console, the following example does not produce any visible results, leaving me uncertain about where I may have misstepped.
var svg = d3.select("svg")
var pi = Math.PI;
var mySquare=svg.append("rect")
.attr("x",60)
.attr("y",60)
.attr("width",200)
.attr("height",200);
mySquare.transition()
.duration(2000)
.attrTween("x", d3.interpolate(60,400))
To view the live demonstration of this example, visit: .