SelectionEach extension

on

Methods

each(EachCallback<void> function) Selection
Invokes the specified function for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with thisArg as the current DOM element (nodes[i]).