suiss/uim · Chart

Radial Chart Interactive

Activity rings for each day of the week, with a day picker and per-ring totals against goals.

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

A Card with a ToggleGroup of seven days, each showing small rings, above a large ring view and per-ring totals. The rings are drawn with Svg circles colored through ChartPalette; RINGS sets each label, unit, goal and color, and WEEK holds three values per day. Picking a day updates the large rings and the totals, which show the value, goal and percentage, with a note when a goal is met.

Installation

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

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

Manual

  1. Install the dependencies:
npx expo install cn react-native-svg
  1. Add the pieces it builds on: Card, Chart, Text, Toggle Group.

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

uniwind/components/charts/radial-chart-interactive.tsx
import { cn } from "cn"
import * as React from "react"
import { View } from "react-native"
import Svg, { Circle, G } from "react-native-svg"
import { Card, CardContent, CardHeader } from "@/components/ui/card"
import { type ChartColor, ChartPalette } from "@/components/ui/chart"
import { Text } from "@/components/ui/text"
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"

type Ring = "move" | "exercise" | "stand"

const RINGS: {
  key: Ring
  label: string
  unit: string
  goal: number
  1. Update the import paths to match your project.

Usage

import { RadialChartInteractive } from "@/components/charts/radial-chart-interactive"
<RadialChartInteractive />

Replace WEEK with your daily values and adjust the goals, units and colors in RINGS. The component takes no props.