Component
Bar
Compare magnitudes across categories with vertical or horizontal bars.
Part-to-whole share for a handful of segments, as a donut or solid pie.
Chart
Part-to-whole share for a handful of segments, as a donut or pie. Not a Chart cousin.
A sorted donut with the total in the centre and a split legend. Variants shows pie, stack and more.
Use PieChart for part-to-whole share with a handful of segments. Split for a labelled share tile. Stack when the card is a tall column.
import { PieChart } from "agentic-ds-kit";From contracts/piechart.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| data | array | No | — | { label: string, value: number, color?: string }[] |
| title | string | No | — | — |
| description | string | No | — | — |
| variant | donut | pie | No | donut | — |
| layout | split | stack | No | split | — |
| showCenterTotal | boolean | No | true | — |
| showTable | boolean | No | true | — |
| sort | boolean | No | true | — |
| maxSegments | number | No | 6 | — |
| size | number | No | 240 | — |
| otherLabel | string | No | Other | — |
| centerLabel | string | No | Total | — |
| emptyLabel | string | No | No data for this range | — |
| isLoading | boolean | No | false | — |
| animate | boolean | No | false | Slices sweep in clockwise from 12 o'clock when the chart first appears. Runs when the chart mounts; changing data on a mounted chart does not replay it. To replay (e.g. one chart per Tabs panel, or a range switcher), give the chart a key that changes with the data. Off under prefers-reduced-motion; the final state shows without JS |
| actions | slot | No | — | Kit Buttons in the chart header, before the Table toggle, like an icon-only Ask. ghost sm reads quietest. Setting it draws the frame even with no title. |