Composed Chart
composed-chartColumns and a line on one axis, on TanStack Charts: volume against its target, actuals against the plan. Rounded columns side by side, the line drawn over them, and a band cursor that lists every series in the column.
import { ComposedChart } from "@/components/forme/composed-chart/composed-chart";
// Signups each month against the plan for that month.
const signups = [
{ month: "Apr", organic: 420, paid: 260, target: 640 },
{ month: "May", organic: 480, paid: 310, target: 700 },
{ month: "Jun", organic: 510, paid: 290, target: 760 },
{ month: "Jul", organic: 590, paid: 340, target: 820 },
{ month: "Aug", organic: 640, paid: 410, target: 880 },
{ month: "Sep", organic: 720, paid: 450, target: 940 },
];
export function ComposedChartDemo() {
return (
<div className="w-full rounded-xl border border-border bg-card p-5 lit edge">
<p className="text-caption-1-medium text-muted-foreground">Signups against plan</p>
<p className="mt-1 text-body-regular text-foreground">
Organic alone now covers three quarters of the target.
</p>
<ComposedChart
className="mt-5"
label="Organic and paid signups each month against the monthly target, April to September"
data={signups}
index="month"
bars={[
{ key: "organic", label: "Organic" },
{ key: "paid", label: "Paid" },
]}
lines={[{ key: "target", label: "Target" }]}
/>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
ComposedChart
Columns and lines on one axis: volume against its target, signups against the trend, actuals against the plan.
| Prop | Type | Default | Description |
|---|---|---|---|
data* | readonly Row[] | — | |
index* | keyof Row & string | — | The field that labels each column: a month, a week, a release. |
bars* | readonly ComposedChartSeries<Row>[] | — | Drawn as columns, side by side. Colours start at --chart-1. |
lines* | readonly ComposedChartSeries<Row>[] | — | Drawn as lines over the columns, coloured after the bars. |
label* | string | — | Accessible name. Say what the columns and the lines each measure. |
formatValue | (value: number) => string | plain | |
height | number | 260 | |
className | string | — |
Related


Chart
The tooltip and legend every Forme chart shares: a floating panel with a colour, a name and a right-aligned value per series, and a row of swatches. Installed with any chart; use them directly to give a chart of your own the same finish.
data display

Heatmap Chart
A grid of cells whose colour carries a quantity, on TanStack Charts: activity by weekday and hour, scores by team and quarter. Six steps of one hue from the sunken surface to the chart accent, optional values in the cells, and a tooltip on every cell.
data display

Histogram Chart
How a set of measurements is distributed, on TanStack Charts. Bins are computed with round edges, the tooltip names each range and its count, and dashed markers put a median or p95 right on the shape.
data display