#208
Basic donut
A donut chart of market share split across five categories.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Basic donut" pattern (@codeatlasdev/ui demo #208, charts/pie) in my app.
Call get_demo({ ids: ["#208"] }) first and keep its structure. It needs @codeatlasdev/[email protected] + echarts.
Use: Showing the proportional split of a total, such as revenue by product line.
Keep these library parts, with the props and tokens the demo uses:
- Card from "@codeatlasdev/ui"
- PieChart from "@codeatlasdev/ui/charts"
Behaviour to keep:
- `<PieChart data={marketData} donut height="300px" />`
- `marketData` has 5 items with `value` and `name`: Cloud Services `38`, Enterprise SW `24`, SaaS Tools `18`, Infrastructure `12`, Other `8`
- Wrapped in `<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 - PieChart
@codeatlasdev/ui/charts
How it is built
- `<PieChart data={marketData} donut height="300px" />`
- `marketData` has 5 items with `value` and `name`: Cloud Services `38`, Enterprise SW `24`, SaaS Tools `18`, Infrastructure `12`, Other `8`
- Wrapped in `<Card full>`
Related
Loading source.