score:1

Accepted answer

I think you just have the selectors the wrong way round. You want to have the svg inside an a tag right?:

d3.select("#pieChart")
  .append("a")
  .append("svg");

You (1) select the pieChart, then (2) append an a tag to it, then you (3) append the svg to that.


Related Query