score:0

Accepted answer

As @adelriosantiago indicated d.data.key was not working. I have finally colored the piechart using attr

.attr("fill", d => color(keyFieldFunction(d.data)));

when the keyFieldFunction was defined back in the code as:

var GUPkeyField = function(d){return d.data.key};

colored pie chart


Related Query