How to implement mouse tooltips over links in a D3 layout of a directional graph? I am fitting an example of the power of D3 , so setting up node popups was simple using code like this:
node.append("title") .text(function(n) { return n.id; });
Attempting a similar technique using links did not result in a mouse hint:
var link = svg.selectAll("line.link") .data(json.links) .enter().append("line") .attr("class", "link") .style("stroke-width", function(d) { return 4; }); link.append("title") .text(function(n) { return n.info; });
source share