I'm trying to get a constraint relaxing to work for my piechart.
It is based on this example https://jsfiddle.net/thudfactor/HdwTH/ but the relaxing method used seems not to work with v4 any more.
The concrete problem is how they access the selection group array directly:
textLabels = labelGroups.append("text").attr( ... );
if(again) {
labelElements = textLabels[0]; <------------- here
textLines.attr("y2",function(d,i) {
labelForLine = d3.select(labelElements[i]);
return labelForLine.attr("y");
});
setTimeout(relax,20)
}
Has it changed with D3 v4.x how you access a selections group array?
How would you go about it now?