score:0

Accepted answer

i think you should be passing your data as an argument in your function. normally, it is taken as default argument when you return the function directly.

piepath[i].setattribute("d", segover(*data associated with segment*));

svg.append("g")
   .attr("class", "piechart")
   .attr("transform", "translate(1250,570)")
   .selectall("path")...
   .attr("d", seg) // this is same as : attr("d", seg(d))
   .on("mouseenter", function(d){
         d3.select(this)
           .transition(10)
           .duration(100)
           .attr("d", segover) // same here
})

Related Query

More Query from same tag