Chart

Typed wrapper over LayerChart. ChartContainer injects theme-aware CSS variables per series; ChartTooltip renders a popover-styled surface that mirrors the rest of the system.

Line chart

Bar chart

Axis tick

Pass a format function via props.xAxis.format to abbreviate or transform tick labels — useful when full month names would overlap.

Legend

Set legend to true on BarChart and pass a series array for a grouped chart with color swatches.

Interactive

onBarClick fires with the data row and series on each column click, letting you drive external state from the chart.

Click a bar to select a month.

Theming

ChartConfig.color must be a CSS custom property reference — raw hex bypasses the token system and breaks dark-mode adaptation. Use theme when you need different values per color scheme.

ChartContainer props

ChartContainer sets the chart id, injects per-series CSS variables (light + dark) via ChartStyle, and applies a set of LayerChart overrides so tooltips, highlights, and axes match the token system.

PropTypeDescription
ChartConfigMap of series key → { label, color | theme, icon }. `color` applies the same value in both themes; `theme` picks different values for light and dark.
stringOverrides the auto-generated chart id. Used to scope injected CSS variables.
stringMerged onto the root via tailwind-merge.

ChartTooltip props

PropTypeDescription
'dot' | 'line' | 'dashed'Shape of the series indicator next to each value.
booleanSuppress the x-axis label at the top of the tooltip card.
booleanHide the colored swatch alongside each value.
stringKey into the config used to look up a label for the hovered row.
stringKey into the config used to look up the series name for each entry.
(value, payload) => string | number | SnippetFormat the tooltip header. Return a Snippet for rich content.
Snippet<[{ value, name, item, index, payload }]>Completely override how each row renders.