donutChart
Appends a donut chart — a pie with a circular hole punched in the centre.
Each entry in slices becomes an annular segment: the outer arc is swept forward, a line drops to the inner radius, the inner arc is swept backward, and the path is closed. Arc approximation matches pieChart (cubic Béziers, k = 4/3·tan(θ/4), ≤90° per cubic). The hole's size is holeRatio of the outer radius.
When showLegend is true (default), the same swatch + label + percentage legend as pieChart is appended.
An empty slices list, or one whose values sum to <= 0, draws nothing.
Parameters
the segments, in draw order from the top, clockwise.
outer diameter of the donut.
inner-hole radius as a fraction of the outer radius, clamped to 0f..0.95f so the ring never vanishes or inverts.
when true, appends a swatch + label + percentage legend.