D3 Events

D3 selections also accept event handlers.
There are especially useful for interaction.

d3.selectAll(foo)
  .on("mouseover", function(d,i) { ... })
  .on("mouseout", function(d,i) { ... })
  .on("click", function(d,i) { ... })

  et cetera ...