Skip to content
Docs/Pie Chart

Pie Chart

Pie and donut charts for showing proportional data.

Installation

tsx
1import { StormPieChart } from '@storm-ds/ui/charts'
2
3# Requires recharts peer dependency
4pnpm add recharts

Default

tsx
1import { StormPieChart } from '@storm-ds/ui/charts'
2
3const data = [
4 { name: 'Desktop', value: 45 },
5 { name: 'Mobile', value: 35 },
6 ...
7]
8
9<StormPieChart data={data} />

Donut

tsx
1<StormPieChart data={data} donut />

With Labels

tsx
1<StormPieChart data={data} showLabel />