suiss/uim · Chart

Radial Chart Text

A full circular ring showing 72% of cloud storage used, with the value in the center.

Radial Chart Text is an open-source mobile chart from suiss/uim, drawn with react-native-svg for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Radial (text) on iOS in light mode

A RadialBarChart drawn as a full circle, with a single value on a 0 to 100 PolarAngleAxis over a tinted track. The percentage and caption are Text layered in the middle. Nothing is interactive.

Installation

$ pnpm dlx @esuiss/uim@latest add radial-chart-text

The CLI also adds what it builds on: Card, Chart, Text.

Manual

  1. Add the pieces it builds on: Card, Chart, Text.

  2. Copy the source into components/charts/radial-chart-text.tsx:

uniwind/components/charts/radial-chart-text.tsx
import { View } from "react-native"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  PolarAngleAxis,
  RadialBar,
  RadialBarChart,
} from "@/components/ui/chart"
import { Text } from "@/components/ui/text"
  1. Update the import paths to match your project.

Usage

import { RadialChartText } from "@/components/charts/radial-chart-text"
<RadialChartText />

Change the value in chartData (0 to 100) and the centered text to match it; the label and color live in chartConfig. The component takes no props.