Chart.Pie

Parts of a whole.

Chart of Freelancers over 4 points
disciplineFreelancers
design86
development54
writing37
consulting21
<Chart.Pie />

Polar marks want a square box and interactive={false} on the root — the keyboard cursor is a cartesian idea.

API

Chart.Pie

PropTypeDefault
dataKeystringField holding each wedge's size. Defaults to the first value key.
endAnglenumber360Where the last wedge ends. A partial sweep draws an arc rather than a circle.
innerRadiusRationumber0Fraction of the outer radius left hollow. 0 draws a full pie.
insetnumber8Pixels kept clear around the wedges, for the active one to lift into.
nameKeystringField naming each wedge's config entry. Defaults to the category field.
padAnglenumber1Radians of blank between two wedges.
startAnglenumber0Where the first wedge begins, in radians clockwise from 12 o'clock.

Plus every <g> prop. Source: chart/components/chart-pie.tsx.

A pie colours by row, not by series, which is why nameKey exists and why the tooltip and legend both read it.

Chart.Slice

PropTypeDefault
cxnumberrequiredCentre of the circle the arc is cut from, in plot coordinates.
cynumberrequiredCentre of the circle the arc is cut from, in plot coordinates.
endAnglenumberrequiredDegrees clockwise from twelve o'clock. A 360-degree sweep draws a full ring.
innerRadiusnumberrequiredInner edge. 0 makes the arc a pie wedge rather than a donut segment.
outerRadiusnumberrequiredOuter edge, in pixels from the centre.
startAnglenumberrequiredDegrees clockwise from twelve o'clock.
state"active" | "idle" | "muted""idle"How this wedge relates to the pointer: active lifts it out of the ring, muted fades the ones it is being compared against.

Plus every <path> prop. Source: chart/components/chart-slice.tsx.

One wedge. Chart.Pie renders these for you; use it directly only when building a round mark of your own.