Using D3 Force Directed Graph listening to events using jquery
I plan to use D3 Force Directed Graph in my project. I was wondering if I can listen to click on the node. To show additional info about the node.
D3 Force Di开发者_如何学运维rected Graph
I appreciate any help.
Perhaps something like
node.on("click", function(d) {
alert("You selected node "+ d);
});
should work.
For mouseover, something like
node.on("mouseover", function(d) {
console.log("Moussed over node "+ d);
});
精彩评论