block by hlvoorhees ddc384ba7aec509a2003

affixing an element to a transitioning path in d3

Full Screen

Using attrtween to affix an svg element to an svg path undergoing transition.

In order to compute its position, 1/3 of the way along the path, the element binds the path as data. (See var linkLabel, toward the end of the javascript file.) Then it uses attrTween (not attr) to fetch the correct position at each animation frame during the transition.

index.html

test_path_transition.js