myTransition.each( [ type ], func ) in D3.js

Run a function on each element at the start or end of the transition.

Arguments

nametypedescription
type String [optional] Either “start” or “end”; if omitted the behavior is immediate, as with selection.each().
func Function Invoked for each element in the seleciton, with parameters for the datum and index, and with the this context set to the DOM element.
Return Type
Transition

Description

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

See Also