I am applying a transition to a group of nodes returned by selectAll(). I thought the end event would fire after all transitions finished, but each(\"end\
selectAll()
each(\"end\
I had the same issue
that the call back gets executed with each element
I have solved that using underscore once method
http://underscorejs.org/#once
d3.select("#myid") .transition() .style("opacity","0") .each("end", _.once(myCallback) );