myTransition.styleTween( name, tweenCalculator, [ priority ] ) in D3.js

Transition a CSS style between two values.

Arguments

nametypedescription
name String Name of the CSS property 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) calculated CSS 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 CSS style value.
priority String [optional] Either null or the string "important".
Return Type
Transition

Description

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

See Also