BulletChart
Actual against target with qualitative context. Replaces a gauge in a twentieth of the space, and stacks.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Actual against target with qualitative context.
Accessibility
Each chart ships an accessible fallback (a visually-hidden data table / aria-label summary) so the data is available to screen readers, not just sighted users. Colour is paired with shape/label, never used alone.
Install and import
npx shadcn@latest add @prism/bullet-chart
import { BulletChart } from '@/components/prism/BulletChart';
In a no-build prototype, read it from the bundle instead: const { BulletChart } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
rows | BulletRow[] | Yes | |
max | number | — | Shared scale ceiling. Omit to derive from the data (+15% headroom). |
bands | number[] | — | Qualitative band stops as percentages of max. Default [60, 80]. |
height | number | — | Track height in px. Default 18. |
showAxis | boolean | — | |
formatValue | (value: number) => React.ReactNode | — | |
caption | string | — | |
className | string | — |