Pie
Part-to-whole share for a handful of segments, as a donut or solid pie.
Compare magnitudes across categories with vertical or horizontal bars.
Chart
Compare magnitudes across categories. Bar length ranks close values. Not a Chart cousin.
Vertical bars with a grid. One ranked comparison.
Close values, the right job for this form
Use BarChart when readers need to rank magnitudes. Vertical for time or ordered categories, horizontal when labels run long. Hover a bar to read it.
import { BarChart } from "agentic-ds-kit";From contracts/barchart.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 | — | single-series flat array |
| categories | array | No | — | — |
| series | array | No | — | — |
| title | string | No | — | — |
| description | string | No | — | — |
| orientation | vertical | horizontal | No | vertical | — |
| showGrid | boolean | No | true | — |
| showTable | boolean | No | true | — |
| height | number | No | 240 | — |
| emptyLabel | string | No | No data for this range | — |
| isLoading | boolean | No | false | — |
| tickInterval | number | No | — | draw every Nth axis label; with neither tickInterval nor formatLabel, labels thin automatically only when they would overlap |
| formatLabel | function | No | — | (category, index) => string for the painted axis label; return '' to hide one (turns off automatic thinning). Table and accessible names keep the raw category |
| animate | boolean | No | false | Bars grow from the zero line (negative values grow downward, horizontal bars sideways) with a short stagger when they first appear. 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 |
| 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. |
Part-to-whole share for a handful of segments, as a donut or solid pie.
Change and progress over ordered samples as a line or area chart.
Plan usage or AI credits against a limit: total, usage by category, daily bars toned against the cap, and a warning near the limit.