# Pie & Donut — React Native chart for Expo

> Rounded slices, semicircles, glow.

Pie or donut with rounded corners, pad angles, partial sweeps (semicircle), glowing segments, outside or percent labels and centre text. Drag around the ring to select; the active slice pops out.

- Docs: https://expokit.in/docs/charts/pie-chart
- Tier: Free (expo-charts, MIT)
- Component: `<PieSeriesChart />`
- Category: Circular
- Also called: pie chart, donut chart, doughnut chart
- Platforms: iOS, Android, web
- Expo Go: yes (draws with react-native-svg)
- Variants: Donut with text, Rounded, Semicircle, Interactive, Labels, Percent

## Installation

```bash
npx expo install expo-charts react-native-svg
```

Import: `import { PieSeriesChart } from "expo-charts";` — then render `<PieSeriesChart data={…} />`.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` | `Datum[]` | — | Rows like [{ browser: "chrome", visitors: 275 }]. |
| `nameKey / valueKey` | `string` | `"name" / "value"` | Which keys hold the label and the number. |
| `config` | `ChartConfig` | — | Labels / colours keyed by name. |
| `size` | `number` | `260` | Diameter. |
| `showLegend` | `boolean` | `false` | Legend under the chart. |
| `legendVariant` | `LegendVariant` | `"rounded-square"` | Legend marker style. |
| `glow` | `boolean \| string[]` | `false` | Glow every segment or only named ones. |
| `isLoading` | `boolean` | `false` | Skeleton state. |
| `onSelect` | `(index, datum) => void` | — | Selection callback. |
| `emptyText` | `string` | `"No data"` | Shown when every value is 0 or data is empty. |
| `accessibilityLabel` | `string` | `generated summary` | VoiceOver / TalkBack label. Swipe up / down selects each slice. |
| `innerRadius` | `number (0–0.95)` | `0.6` | 0 = pie, 0.6 = donut. |
| `cornerRadius` | `number` | `0` | Rounded slice corners. |
| `padAngle` | `number (deg)` | `0` | Gap between slices. |
| `startAngle / endAngle` | `number (deg)` | `0 / 360` | -90 / 90 makes a semicircle. |
| `activeIndex / defaultActiveIndex` | `number \| null` | `null` | Controlled / initial selection. |
| `activeOffset` | `number` | `8` | How far the active slice pops out. |
| `labels` | `"none" \| "inside" \| "outside" \| "percent"` | `"none"` | Slice labels. |
| `centerValue / centerLabel` | `string` | `total / "Total"` | Donut centre text (null hides). |
| `onScrubStart / onScrubEnd` | `() => void` | — | Pause your ScrollView while dragging round the ring. |

## FAQ

### How do I make a pie chart in React Native?

Use ExpoKit's Pie & Donut: install the expo-charts package (npx expo install expo-charts react-native-svg) and render <PieSeriesChart data={…} />. It's animated and touchable, and works on iOS, Android, web and in Expo Go.

### Does Pie & Donut work in Expo Go?

Yes. It draws with react-native-svg, which Expo Go includes, so it runs on iOS and Android with no development build.

### Is Pie & Donut free?

Yes. Pie & Donut is in expo-charts, which is free and MIT-licensed.

## More

- Live preview, variants and code: https://expokit.in/docs/charts/pie-chart
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
