Native Solid 2 fork of solid-recharts (MIT, © Thomas Guehenneux), derived from Recharts (MIT, © recharts). Adapted documentation; neither project endorses this fork.
ComposedChart
ComposedChart is the cartesian container for mixed Area, Bar,
and Line series in a single chart. It owns the layout, scales, and
interaction state; children like XAxis, CartesianGrid and Tooltip register themselves
into it.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | object[] | — | Source data array, one entry per x position |
width, height | number | — | Fixed size (omit when inside ResponsiveContainer) |
layout | "horizontal" | "vertical" | "horizontal" | Direction of the independent axis |
margin | { top, right, bottom, left } | { 5, 5, 5, 5 } | Space around the plot area |
syncId | string | — | Sync tooltip/brush across charts sharing the id |
onClick, onMouseMove, … | function | — | Chart-level mouse events with the active payload |
The base props follow the Recharts 3.9.2 ComposedChart API (reference commit b3451050) that solid-recharts tracks; see the Recharts ComposedChart reference. The next-suite release scope lists selected adaptations, not full Recharts 3.10.1 parity.
Notes
- Add any combination of
<Bar>,<Area>, and<Line>children. In the browser their order does not change the result; for server rendering, put the axes before the series (see Server geometry needs explicit axes). - All series share the same x and y axes unless you assign custom
xAxisId/yAxisId. - Set
stackIdon two or moreBarorAreachildren to stack them. Stacked series with an automatic domain are only correct after the client renders; for server rendering, follow the explicit-axes recipe. - Set
syncIdon two charts to mirror tooltips and brushes between them.
See also
- Area — fill series with dots and labels
- Bar — column series with shapes and stacking
- Line — line series with curves and customization
- XAxis · YAxis