score:4

Accepted answer

According to the documentation for d3.tree (https://github.com/mbostock/d3/wiki/Tree-Layout#wiki-_tree) d3 adds a parent attribute to each node. In your mouseover callback, you could traverse up the tree and set a value on each node indicating that it should be highlighted (i.e. d.highlight = true). Then have your update/render code check that value to conditionally apply whatever classes/styles you want.


Related Query

More Query from same tag