score:4

Accepted answer

You simply need to bind actions with commands like :

node.on("mouseover", mouseover)
    .on("mouseout", mouseout)

Where mouseover and mouseoutare functions where you can get the hovered-on node in the argument :

function mouseover(d) {
    // d is the node object
    // You can even get mouse position with this command
    var mousePos = d3.mouse(this);
}

The book "Interactive Data Visualization" also has a chapter where it is explained how to make a tooltip appear.


Related Query

More Query from same tag