From the discussion with you, I think canvas-based drawing for d3 is not supported with usual mouse event. My source of info:

To quote the important part:

If you’ve been paying attention, you’re probably asking yourself now “what about mouse events?!” Good call. Sadly, this approach does not allow us to use the wonderful on event listener that we can normally attach to selections and react to. The most we can do is attach a mouse listener to the canvas element itself, get the x and y coordinates of the pointer and proceed to resolve that somehow ourselves.

Related Query

More Query from same tag