0
Ich versuche href
zu d3js Diagramm wie in diesem post und here erläutert zu implementieren. Ich habe eine einfache href
zu this d3js Balkendiagramm hinzugefügt, aber es funktioniert nicht. Hier ist mein Code:
Ich importierte xlink
in html
:d3js: `xlink: href` funktioniert nicht
<myatr xmlns:xlink="http://www.w3.org/1999/xlink">
</myatr>
und das ist mein Teil d3js Code,
svg.selectAll(".bar")
.data(data)
.enter().append("rect")
.attr("class", "bar")
.attr("x", function(d) { return x(d.letter); })
.attr("width", x.rangeBand())
.attr("y", function(d) { return y(d.frequency); })
.attr("height", function(d) { return height - y(d.frequency); })
.attr("xlink:href",function(d){return "www.google.com";});
Ja, tut es! Vielen Dank :) – ramesh