#201
Area with gradient fill
A single Revenue line with a filled area under it across nine months.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Area with gradient fill" pattern (@codeatlasdev/ui demo #201, charts/line) in my app.
Call get_demo({ ids: ["#201"] }) first and keep its structure. It needs @codeatlasdev/[email protected] + echarts.
Use: Emphasizing volume or cumulative growth of one metric over time.
Keep these library parts, with the props and tokens the demo uses:
- Card from "@codeatlasdev/ui"
- LineChart from "@codeatlasdev/ui/charts"
Behaviour to keep:
- `<LineChart` with one series `{ name: 'Revenue', data: revenue }`
- `revenue` has 9 values from `42000` to `112000`
- `categories={months}` with `'Jan'` to `'Sep'`
- `area` prop
- `valueFormatter={fmt}` renders `$${(v / 1000).toFixed(0)}k`
- `height="360px"` inside `<Card full>`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Card
@codeatlasdev/ui - LineChart
@codeatlasdev/ui/charts
How it is built
- `<LineChart` with one series `{ name: 'Revenue', data: revenue }`
- `revenue` has 9 values from `42000` to `112000`
- `categories={months}` with `'Jan'` to `'Sep'`
- `area` prop
- `valueFormatter={fmt}` renders `$${(v / 1000).toFixed(0)}k`
- `height="360px"` inside `<Card full>`
Related
Loading source.