myTransition.duration( durationCalculator ) in D3.js
Calculate per-element transition duration.
Arguments
name | type | description |
---|---|---|
durationCalculator | Function |
Invoked for each element in the transition selection, passed the element’s datum, index, and with the this context set to the element. The return value is set as the transition duration for the element, in milliseconds.
|
- Return Type
- Transition
Description
For more details see https://github.com/mbostock/d3/wiki/Selections#wiki-duration.
See Also
- Transition.duration(durationMS)