D3 force directed graph. On mouse over show labels
This is related to this question.
Caveat! I am very much a rookie programmer… any help is massively appreciated!
I’m using http://mbostock.github.com/d3/ex/force.html to generate a force directed graph on some php generated json data. I have managed to get some code ( //Highlight selected node, its links, and its children in a D3 force directed graph ) whereby on mouse over everything fades except the node and the connecting nodes.
This is my current code:
I would now like to add the titles to the node and each child node on mouse over at the same time as the fade. This would greatly increase the usability of the program. Any idea how to do that???
So thanks to Nachtgold I got the labels on the nodes, changed the font color and size. The flickering that happened when the cursor coincidentally hit a text label was pretty annoying. I fixed this by using
The current edition is thus:
I would still like to move the text relative to the nodes so they don’t overlap. Any ideas how to do this?
Thanks a bunch!