Skip to content
GitSiteEmail

The Chart.Area component fills the region of a Chart.Line down to the baseline. All Line features — curves, gaps, hovering, axes, and legend — apply unchanged.

import Chart from '@components/Feedback/Chart/Chart';
import { createSignal } from 'solid-js';
const App = () => {
const [load] = createSignal([
{
label: 'Player',
points: [
{ type: 'strength', value: 13 },
{ type: 'agility', value: 9 },
{ type: 'stamina', value: 16 },
],
},
]);
return (
<Chart.Area data={load()} interactive>
<Chart.YAxis />
<Chart.XAxis />
<Chart.Legend position="bottom" />
</Chart.Area>
);
};

By default, series overlap with translucent fills (0.25 opacity) so overlapping areas remain visible. Each area keeps a full-strength outline for clarity.

For stacked areas where series sit on top of each other:

<Chart.Area data={load()} stacked />
<Chart.Area data={load()}>
<Chart.Area.Stroke width={0} />
</Chart.Area>

Inherits all Chart.Line props, plus:

PropTypeDefaultDescription
stackedbooleanfalseStack series instead of overlapping.
PropTypeDefaultDescription
classstring""CSS classes for filled regions.
styleJSX.CSSProperties{}Inline styles for filled regions.
opacitynumber0.25Fill opacity (increase when series don’t overlap).
curveCurveTypeinheritsOverride chart’s curve.

Same props as Chart.Line.Stroke. Set width={0} to remove outline.

Same props as Chart.Line.Point.

Chart.XAxis, Chart.YAxis, Chart.Grid, Chart.Legend, Chart.Tooltip, Chart.Labels — see Shared slots.