How can I add hyperlinks to d3-generated table rows and/or cells?
If I were following the same convention as adding hyperlinks to rects, lines, and other objects, after importing the xlink namespace, you append an a
tag and set the hyperlink attribute, and then append your desired object, like so:
chartBody.selectAll("node")
.data(dataset)
.enter()
.append("a")
.attr("xlink:href", "http://stackoverflow.com")
.append("line")
...
But when you change the character in the story from a rect or line to a table row or cell, it doesn't work...
tablebody.selectAll("row")
.data(parsedtext)
.enter().append("a")
.attr("xlink:href", "http://stackoverflow.com")
.append("tr")
...