ComboChart
Bars on the left axis, a line on the right. One volume, one rate — both axes labelled.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Bars on the left axis, a line on the right.
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/combo-chart
import { ComboChart } from '@/components/prism/ComboChart';
In a no-build prototype, read it from the bundle instead: const { ComboChart } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
categories | string[] | Yes | |
bars | ComboSeries | Yes | The volume series, drawn as bars on the LEFT axis. |
line | ComboSeries | Yes | The rate series, drawn as a line on the RIGHT axis. |
yLabel | string | Yes | Left axis unit. REQUIRED in practice — an unlabelled dual axis is unreadable. |
y2Label | string | Yes | Right axis unit. REQUIRED in practice. |
height | number | — | |
showGrid | boolean | — | |
formatY | (value: number) => React.ReactNode | — | |
formatY2 | (value: number) => React.ReactNode | — | |
caption | string | — | |
className | string | — |