chart = {
const arc = vl
.markArc({ innerRadius: width / 13, padAngle: 0.01 })
.encode(
vl.order().count().sort("descending"),
vl.theta().count().stack(true),
vl.color().fieldN(splitBy).scale({ scheme: "pastel1" })
);
const textConfig = { radius: width / 10, align: "center", dy: 7 };
const textName = arc
.markText(textConfig)
.encode(
vl.text().count(),
vl.detail().fieldN(splitBy),
vl.color().value("Black")
);
const textValue = textName
.markText({ ...textConfig, dy: -7, fontWeight: "bold", fontSize: 14 })
.encode(vl.text().fieldN(splitBy));
return vl
.layer(arc, textName, textValue)
.width(width/2)
.data(data)
.render();
}