suiss/ui · Chart
Pie Chart Half
A semicircular gauge-style pie showing battery share by device, with a caption under the arc.
Pie Chart Half 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 semicircular donut that reads like a gauge, with a figure and caption tucked under the arc. Use it in compact cards where a full circle takes too much height.
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-half.tsx:
- Update the import paths to match your project.
Usage
Replace chartData with your categories and their shares, and add each key to chartConfig. The tooltip appends a percent sign, so change its formatter if your values aren't percentages. Update the figure and caption under the arc, which are plain text.
Notes
The centered figure and caption are hard-coded, not computed from the data. The arc's size depends on the container height, so check the fit if you change the chart's height.

A PieChart drawn from 180 to 0 degrees, with rounded, spaced slices. chartData holds a percentage share per device. A centered Text shows the 100% total, and the tooltip uses a custom formatter to print each share as a percentage.
Installation
The CLI also adds what it builds on: Card, Chart, Text.
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 shares and update chartConfig and the caption under the arc. The component takes no props.
