pieChart
Appends a pie chart.
Each entry in slices becomes a wedge whose angle is its share of the total. A wedge is a path: move to the centre, line to the arc's start point, sweep the outer arc (approximated with cubic Béziers — arcs wider than 90° are split into multiple cubics using the standard k = 4/3·tan(θ/4) control handle), then close back to the centre. The first slice starts at the top (12 o'clock) and slices sweep clockwise.
When showLegend is true (default), a column of legend rows is added beside the pie, each with a small colour swatch, the slice's label, and its percentage of the total.
An empty slices list, or one whose values sum to <= 0, draws nothing.
Parameters
the wedges, in draw order from the top, clockwise.
outer diameter of the pie.
when true, appends a swatch + label + percentage legend.