text2 = svg
.append("g")
.attr("class", "text2")
.selectAll("text")
.data(data)
.enter()
.append("text")
.attr("dx", (f) => f.cgeom[0])
.attr("dy", (f) => f.cgeom[1] + (f.r1 * 3.5) / 10)
.text(function (f) {
return f.valeur < 1000000
? `${Math.round(f.valeur / 1)}M€`
: `${Math.round(f.valeur / 1000000)}`;
})
.attr("text-anchor", "middle")
.attr("dominant-baseline", "middle")
.attr("fill", "white")
.attr("font-family", function (d, i) {
return i < 5 ? "serif" : "sans-serif";
})
.style("font-size", (f) => `${(f.r1 * 3.5) / 10}px`)