Area Chart Card
Composition over time - several series as stacked areas with soft gradient fills, a dashed cursor, and a count-up headline that swaps to the hovered category's total. One prop switches between stacked, overlapping and 100% views; another swaps the monotone spline for straight segments.
Visitors
Provided data| Category | Value |
|---|---|
| Jan | 4,400 |
| Feb | 4,900 |
| Mar | 5,600 |
| Apr | 5,600 |
| May | 6,800 |
| Jun | 7,500 |
| Jul | 8,200 |
| Aug | 8,700 |
| Sep | 9,500 |
| Oct | 10,400 |
| Nov | 10,900 |
| Dec | 12,200 |
Installation
Download the React source package, install its dependencies, and import the component with its shared styles.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="area-chart-card"/>;}Variants
Use stacked areas to read combined volume, overlapping areas to compare series, or the percent variant to express every category as shares of 100%. shape controls whether the connecting segments are curved or straight.
Visitors
Provided data| Category | Value |
|---|---|
| Jan | 4,400 |
| Feb | 4,900 |
| Mar | 5,600 |
| Apr | 5,600 |
| May | 6,800 |
| Jun | 7,500 |
| Jul | 8,200 |
| Aug | 8,700 |
| Sep | 9,500 |
| Oct | 10,400 |
| Nov | 10,900 |
| Dec | 12,200 |
Visitors
Provided data| Category | Value |
|---|---|
| Jan | 4,400 |
| Feb | 4,900 |
| Mar | 5,600 |
| Apr | 5,600 |
| May | 6,800 |
| Jun | 7,500 |
| Jul | 8,200 |
| Aug | 8,700 |
| Sep | 9,500 |
| Oct | 10,400 |
| Nov | 10,900 |
| Dec | 12,200 |
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="area-chart-card" example="variants"/>;}Data
Provide flat data rows with a label and numeric fields for each series. series identifies those fields and their colors. The component derives totals, legend values, tiles and hover readouts. Supply ranges for a period dropdown; the default preview includes three illustrative periods.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="area-chart-card" data={[{name:'Jan',value:120,previous:100},{name:'Feb',value:180,previous:150},{name:'Mar',value:160,previous:140}]}/>;}