suiss/uim · Chart

Radial Chart Gauge

A gauge arc showing an air quality reading of 38 with a label in the middle.

Radial Chart Gauge 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 (gauge) on iOS in light mode

A RadialBarChart drawn from 210 to -30 degrees, with a single value on a 0 to 100 PolarAngleAxis and a tinted track behind it. The number and its rating are Text layered over the arc. Nothing is interactive.

Installation

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

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-gauge.tsx:

uniwind/components/charts/radial-chart-gauge.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 { RadialChartGauge } from "@/components/charts/radial-chart-gauge"
<RadialChartGauge />

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.