suiss/uim · Chart

Radial Chart Batteries

A row of small circular gauges showing the battery level of four devices.

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

A Card that renders one RadialBarChart ring per entry in devices, each with a level from 0 to 100. A ring turns red at or below LOW (20%) and is green otherwise, with the device initial in the center and its percentage and name below. Each gauge is a single accessible element labeled with name and level. Nothing is interactive. The rings set isAnimationActive={false} and draw without the enter animation.

Installation

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

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

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

Replace devices with your names and levels, and change LOW to move the warning threshold. The component takes no props.