A selection is an array of groups, and each group is an array of elements
The group is selection[0] and the node
is selection[0][0]
selection.attr("some_attr", function(d, i) { this.something = ...; }) selection.style("some_style", function(d, i) { this.something = ...; })
this
i
d
By Wenbin He