Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
categoriesstring[]Yes
barsComboSeriesYesThe volume series, drawn as bars on the LEFT axis.
lineComboSeriesYesThe rate series, drawn as a line on the RIGHT axis.
yLabelstringYesLeft axis unit. REQUIRED in practice — an unlabelled dual axis is unreadable.
y2LabelstringYesRight axis unit. REQUIRED in practice.
heightnumber—
showGridboolean—
formatY(value: number) => React.ReactNode—
formatY2(value: number) => React.ReactNode—
captionstring—
classNamestring—