score:0

d3's on function serves the purpose better:

svg.selectAll("g.arc)
  ...
  .on("click", function(d, i) {
    location.href = script + "&param=" + d.amt;
  });

attr sets the target statically, while creating the elements. on determines the target dynamically, when the click occurs.

Apart from that, d.amt is correct, and I'd also expect your attr variant to work.


Related Query

More Query from same tag