myTransition.attrTween( name, tweenCalculator ) in D3.js

Transition an attribute between two values.

Arguments

nametypedescription
name String Name of the attribute to transition.
tweenCalculator Function Invoked for each element in the transition selection at the start of the transition, passed the current datum, index, and current (pre-transition) attribute value, with the this context as the current DOM element. This function must then return a tween interpolator function to use during the transition; the interpolator will be passed parameterized time in the domain [0,1] and must return the desired attribute value.
Return Type
Transition

Description

For more details see https://github.com/mbostock/d3/wiki/Transitions#wiki-attrTween.

See Also