3

So I have a force directed graph, and I would like that when I hover a node, all the connected nodes and links gets highlighted ( the stroke color would change until the mouse would leave the node )

This would help the navigation of really crowded graphs.

How can I find connected links ( and connected nodes ) when inside of the on() function ?

var nodeCircle = node.append("circle")
.on("mouseover",function(d) {
    [...] //Find attached link, and node, and force a stroke color
})
.on("mouseout", function(d) {
    [...] //Restore previous color
});
VividD
  • 10,456
  • 6
  • 64
  • 111
FMaz008
  • 11,161
  • 19
  • 68
  • 100
  • 2
    mbostock answered this himself: http://stackoverflow.com/questions/8739072/highlight-selected-node-its-links-and-its-children-in-a-d3-js-force-directed-g – mccannf May 17 '13 at 20:34
  • I voted for question close as duplicate, thanks. – FMaz008 May 17 '13 at 21:19

0 Answers0