Reputation: 3891
I am trying to follow the advice laid out in this post's answer and comments: Hyperlinks in d3.js objects to add hyperlinks to circles in a d3.js bubble graph. Here's where I am trying to do this, and here's the original bl.ock I am trying to modify. As you can see all I've done is the following:
<html>
tag with: <html xmlns:xlink="http://www.w3.org/1999/xlink">
Insert this code right after creation of var node
node.append("svg:a").
attr("xlink:href", function(d){return "http://www.google.com";});
I am using Chrome and Firefox to test the page, and I don't see a hyperlink in either. Following some comments on the answer, I have tried:
html
namespace declarationnode.append("a")
I don't see any results with any of these options, though I have been clearing my browser cache and using multiple computers to make sure I am seeing the fresh code. What am I doing wrong?
Upvotes: 0
Views: 77
Reputation: 124059
The <a>
has no content so it has no click area. You need to make something a child of the <a>
nodes.
Upvotes: 1