suiss/ui · Chart
Pie Chart Donut
A donut chart with a hollow center and small gaps between slices.
Pie Chart Donut is an open-source chart from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
A donut with a hollow center and small gaps between slices. It reads lighter than a full pie and leaves the center free for a label if you need one later.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Copy the source into
components/charts/pie-chart-donut.tsx:
- Update the import paths to match your project.
Usage
Replace chartData and add a label and color to chartConfig for each category key. Change the ring thickness with innerRadius and outerRadius, and the gap between slices with paddingAngle.

A PieChart whose Pie uses innerRadius to leave the middle empty and paddingAngle to space the slices. chartData holds one record per device with a users count. Pressing a slice shows a tooltip.
Installation
The CLI also adds what it builds on: Card, Chart.
Manual
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Replace chartData with your records and keep dataKey and nameKey in step with your field names. Add one entry per slice to chartConfig with its label and color; the component takes no props.
