I used the following example to create directed graphs
http://bl.ocks.org/1153292
I want to add a click event so that when a user clicks on a node, the node title is displayed
So far i have done it
var circle = svg.append("svg:g").selectAll("circle")
.data(force.nodes())
.enter().append("svg:circle")
.attr("r", 6)
**.on("mouseup", disp)**
.call(force.drag);
;
function disp() {
alert("Display the heading of the node clicked here");
};
Please tell me how to display this.
source
share