suiss/ui
  • Docs
  • Components
  • Patterns
  • Interactions
  • Charts
  • Blocks
GitHubGet started
DocsComponentsPatternsInteractionsChartsBlocks
Charts70
  • Overview
Area
  • Axes
  • Default
  • Gradient
  • Interactive
  • Linear
  • Range
  • Sparkline
  • Stacked
  • Stacked Expand
  • Step
Bar
  • Active
  • Default
  • Horizontal
  • Hourly
  • Interactive
  • Labeled
  • Multiple
  • Negative
  • Range
  • Stacked
Line
  • Default
  • Dots
  • Forecast
  • Goal
  • Goal Dots
  • Interactive
  • Labeled
  • Linear
  • Multiple
  • Step
Pie
  • Active
  • Default
  • Donut
  • Donut Text
  • Half
  • Interactive
  • Label
  • Legend
  • Nested
  • Separated
Radar
  • Default
  • Dots
  • Grid Circle
  • Grid Filled
  • Grid None
  • Interactive
  • Legend
  • Lines Only
  • Multiple
  • Radius Axis
Radial
  • Batteries
  • Default
  • Gauge
  • Interactive
  • Label
  • Progress
  • Rings
  • Stacked
  • Text
  • Tinted
Tooltip
  • Custom
  • Dashed
  • Dot
  • Formatter
  • Icons
  • Interactive
  • Label Formatter
  • Line
  • No Indicator
  • No Label

suiss/ui · Chart

Radial Chart Rings

Three nested activity rings for move, exercise and stand, drawn as plain SVG circles.

Radial Chart Rings 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.

components/charts/radial-chart-rings.tsx
"use client"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

const rings = [
  {
    key: "move",
    label: "Move",
    value: 720,
    goal: 600,

Three nested activity rings for move, exercise and stand, each filling toward its own goal. They are drawn as plain SVG circles, so this is the lightest option when you just need static progress rings.

Installation

CLI

$ pnpm dlx shadcn@latest add @esuiss/radial-chart-rings

Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-rings

Manual

  1. Add the pieces it builds on: Card.

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

components/charts/radial-chart-rings.tsx
"use client"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

const rings = [
  {
    key: "move",
    label: "Move",
    value: 720,
    goal: 600,
  1. Update the import paths to match your project.

Usage

import { RadialChartRings } from "@/components/charts/radial-chart-rings"
<RadialChartRings />

Edit the rings array with your labels, values, goals and colors; each ring fills by value divided by goal. Change SIZE and BAR for the overall size and ring thickness.

Notes

The graphic is exposed as an image with a label listing each ring's value and goal. A value above its goal just shows a closed ring, with no second lap.

iOS
Radial (rings) on iOS in light modeRadial (rings) on iOS in dark mode
uniwind/components/charts/radial-chart-rings.tsx
import { View } from "react-native"
import Svg, { Circle, G } from "react-native-svg"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import { type ChartColor, ChartPalette } from "@/components/ui/chart"

const rings: {
  key: string
  label: string
  value: number
  goal: number
swift/Charts/RadialChartRings.swift
import SwiftUI

private let rings: [(key: String, label: String, value: Double, goal: Double, color: Color)] = [
  ("move", "Move", 720, 600, Palette.red500),
  ("exercise", "Exercise", 62, 30, Palette.green500),
  ("stand", "Stand", 12, 12, Palette.cyan500),
]

private let size: CGFloat = 200
private let bar: CGFloat = 16

public struct RadialChartRings: View {
  public init() {}

  public var body: some View {
    Card(.filled, size: .sm) {
kotlin/charts/RadialChartRings.kt
package com.esuiss.ui.charts

import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.semantics.clearAndSetSemantics

Three rings drawn with Svg circles colored through ChartPalette. Each entry in rings has a value and a goal, and the filled arc is capped at a full circle. The whole graphic is one accessible image whose label lists each ring's value and goal. Nothing is interactive.

Installation

$ pnpm dlx shadcn@latest add @esuiss-rn/radial-chart-rings

See Installation for the components.json setup. Or use the suiss/ui CLI:

$ pnpm dlx @esuiss/ui@latest add radial-chart-rings
$ pnpm dlx @esuiss/ui@latest add radial-chart-rings --platform swift
$ pnpm dlx @esuiss/ui@latest add radial-chart-rings --platform kotlin

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

Manual

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

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

uniwind/components/charts/radial-chart-rings.tsx
import { View } from "react-native"
import Svg, { Circle, G } from "react-native-svg"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import { type ChartColor, ChartPalette } from "@/components/ui/chart"

const rings: {
  key: string
  label: string
  value: number
  goal: number
  1. Update the import paths to match your project.
  1. Install the dependencies:
npx expo install react-native-svg
  1. Add the pieces it builds on: Card, Chart.

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

nativewind/components/charts/radial-chart-rings.tsx
import { View } from "react-native"
import Svg, { Circle, G } from "react-native-svg"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import { type ChartColor, ChartPalette } from "@/components/ui/chart"

const rings: {
  key: string
  label: string
  value: number
  goal: number
  1. Update the import paths to match your project.
  1. Install the dependencies:
npx expo install react-native-svg
  1. Add the pieces it builds on: Card, Chart.

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

stylesheet/components/charts/radial-chart-rings.tsx
import { View } from "react-native"
import Svg, { Circle, G } from "react-native-svg"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import { type ChartColor, ChartPalette } from "@/components/ui/chart"

const rings: {
  key: string
  label: string
  value: number
  goal: number
  1. Update the import paths to match your project.
  1. Target iOS 17 or later.

  2. Copy the theme files every view uses:

swift/Theme/Theme.swift
import SwiftUI
import UIKit

struct RGBA: Sendable {
  let red: CGFloat
  let green: CGFloat
  let blue: CGFloat
  let alpha: CGFloat

  init(_ hex: UInt32, _ alpha: CGFloat = 1) {
    red = CGFloat((hex >> 16) & 0xFF) / 255
    green = CGFloat((hex >> 8) & 0xFF) / 255
    blue = CGFloat(hex & 0xFF) / 255
    self.alpha = alpha
  }
swift/Theme/Tokens.swift
import SwiftUI

public enum EsuissColor {
  public static let background = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x000000))
  public static let foreground = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
  public static let card = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x1D1D1F))
  public static let cardForeground = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
  public static let popover = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x1D1D1F))
  public static let popoverForeground = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
  public static let primary = Color.adaptive(light: .init(0x0071E3), dark: .init(0x2997FF))
  public static let primaryForeground = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0xFFFFFF))
  public static let secondary = Color.adaptive(light: .init(0x000000, 0.04), dark: .init(0xFFFFFF, 0.1))
  public static let secondaryForeground = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
  public static let muted = Color.adaptive(light: .init(0xF5F5F7), dark: .init(0x161617))
  public static let mutedForeground = Color.adaptive(light: .init(0x6E6E73), dark: .init(0xA1A1A6))
  public static let accent = Color.adaptive(light: .init(0x000000, 0.06), dark: .init(0xFFFFFF, 0.1))
  1. Copy the source and every file it uses:
swift/Charts/RadialChartRings.swift
import SwiftUI

private let rings: [(key: String, label: String, value: Double, goal: Double, color: Color)] = [
  ("move", "Move", 720, 600, Palette.red500),
  ("exercise", "Exercise", 62, 30, Palette.green500),
  ("stand", "Stand", 12, 12, Palette.cyan500),
]

private let size: CGFloat = 200
private let bar: CGFloat = 16

public struct RadialChartRings: View {
  public init() {}

  public var body: some View {
    Card(.filled, size: .sm) {
swift/Components/Card.swift
import SwiftUI

public struct Card<Content: View>: View {
  public enum Variant: CaseIterable, Sendable {
    case `default`, filled
  }

  public enum Size: CaseIterable, Sendable {
    case `default`, sm

    var spacing: CGFloat {
      switch self {
      case .default: 24
      case .sm: 16
      }
    }
  1. Add the files to your app target.
  1. Set minSdk to 24 or higher and add the dependencies:
build.gradle.kts
implementation(platform("androidx.compose:compose-bom:2026.09.00"))
implementation("androidx.compose.foundation:foundation")
implementation("androidx.compose.ui:ui")
  1. Copy the theme files every view uses:
kotlin/theme/Theme.kt
package com.esuiss.ui.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.dropShadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.shadow.Shadow as DropShadow
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.LineHeightStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.DpOffset
kotlin/theme/Tokens.kt
package com.esuiss.ui.theme

import androidx.compose.runtime.Immutable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Immutable
data class Colors(
    val background: Color,
    val foreground: Color,
    val card: Color,
    val cardForeground: Color,
    val popover: Color,
    val popoverForeground: Color,
    val primary: Color,
    val primaryForeground: Color,
  1. Copy the source and every file it uses:
kotlin/charts/RadialChartRings.kt
package com.esuiss.ui.charts

import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.semantics.clearAndSetSemantics
kotlin/components/Card.kt
package com.esuiss.ui.components

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicText
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.compositionLocalOf
kotlin/components/Content.kt
package com.esuiss.ui.components

import androidx.compose.runtime.compositionLocalOf
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

val LocalContentStyle = compositionLocalOf { TextStyle.Default }

val LocalContentColor = compositionLocalOf { Color.Unspecified }

val LocalIconSize = compositionLocalOf { 20.dp }
  1. Update the com.esuiss.ui package names to match your project.

Usage

import { RadialChartRings } from "@/components/charts/radial-chart-rings"
<RadialChartRings />

Replace the values, goals and colors in rings, and change SIZE and BAR to resize the rings. The component takes no props.

NextRadial Chart StackedPreviousRadial Chart Progress

On this page

  1. 01Installation
    • CLI
    • Manual
  2. 02Usage
  3. 03Notes
  4. 04Installation
    • Manual
  5. 05Usage