suiss/ui
  • Docs
  • Components
  • Patterns
  • Interactions
  • Charts
  • Blocks
  • AI
GitHubCreate
DocsComponentsPatternsInteractionsChartsBlocksAICreate
Charts70
  • Overview
  • Area Chart
  • Bar Chart
  • Line Chart
  • Pie Chart
  • Radar Chart
  • Radial Chart
  • Tooltip Chart

suiss/ui ยท Chart

Radial Chart

Ten radial charts for progress and proportions, from concentric bars to gauges, rings, stacked arcs and centered values.

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

Radial charts bend bars around a center to show progress toward a goal or how categories compare. Use concentric bars for a few categories, a single ring with a centered value for one percentage, and a gauge or three-quarter arc when the value has a limit. The rings, batteries and stacked variants cover activity rings, device charge and two series sharing one arc.

Each chart is built on the Chart and Card components.

Every variant below is its own registry item, so you can add only the ones you need. Each one renders the same design on React, React Native, SwiftUI and Jetpack Compose.

Default

Concentric radial bars, one per device, each running around a gray background track.

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

import { RadialBar, RadialBarChart } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,

Concentric radial bars, one per category, each running along a gray background track. Use it as a compact, circular alternative to a bar chart for a few categories.

Give each record a category key, a value and a fill that points at its color, and add each key to chartConfig. barSize sets the ring thickness and innerRadius opens up the center. Arc lengths are relative to the largest value, which closes a full circle; add a PolarAngleAxis with a fixed domain to measure against a known maximum. The first record sits on the innermost ring, where the same value looks shorter.

Installation

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

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-default
  1. Install the following dependencies:
$ pnpm add recharts
  1. Add the pieces it builds on: Card, Chart.

  2. Copy and paste the following code into your project.

components/charts/radial-chart-default.tsx
  1. Update the import paths to match your project setup.

Usage

import { RadialChartDefault } from "@/components/charts/radial-chart-default"
<RadialChartDefault />
Web

Web preview

uniwind/components/charts/radial-chart-default.tsx
swift/Charts/RadialChartDefault.swift
kotlin/charts/RadialChartDefault.kt

A RadialBarChart with one bar per record in chartData (a device and a users count). Each bar is colored through a Cell that reads chartConfig, over a track in the secondary color. Pressing a bar shows a tooltip.

Replace chartData with your records and add a matching entry per item to chartConfig, whose colors the Cell children read. The component takes no props.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-default --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-default

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-default --platform kotlin

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

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

  2. Copy and paste the following code into components/charts/radial-chart-default.tsx:

uniwind/components/charts/radial-chart-default.tsx
  1. Update the import paths to match your project setup.
  1. Add the pieces it builds on: Card, Chart.

  2. Copy and paste the following code into components/charts/radial-chart-default.tsx:

nativewind/components/charts/radial-chart-default.tsx
  1. Update the import paths to match your project setup.
  1. Add the pieces it builds on: Card, Chart.

  2. Copy and paste the following code into components/charts/radial-chart-default.tsx:

stylesheet/components/charts/radial-chart-default.tsx
  1. Update the import paths to match your project setup.
  1. Target iOS 17 or later.

  2. Add the Swift package to your app:

Package.swift
.package(url: "https://github.com/phosphor-icons/swift", from: "2.1.0")
  1. Copy the theme files every view uses:
swift/Theme/Theme.swift
swift/Theme/Tokens.swift
  1. Copy the source and every file it uses:
swift/Charts/RadialChartDefault.swift
swift/Components/Card.swift
swift/Components/Chart.swift
swift/Components/Checkbox.swift
swift/Components/Field.swift
swift/Components/Haptics.swift
swift/Components/Item.swift
swift/Components/Separator.swift
  1. Add the files to your app target.
  1. Apply the Compose compiler plugin, enable Compose, set compileSdk to 37 or higher and minSdk to 24 or higher, and add the dependencies:
build.gradle.kts
plugins {
    id("org.jetbrains.kotlin.plugin.compose")
}

android {
    compileSdk = 37
    defaultConfig { minSdk = 24 }
    buildFeatures { compose = true }
}

dependencies {
    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
kotlin/theme/Tokens.kt
  1. Copy the source and every file it uses:
kotlin/charts/RadialChartDefault.kt
kotlin/components/Card.kt
kotlin/components/Chart.kt
kotlin/components/Content.kt
kotlin/components/FormSupport.kt
kotlin/components/Haptics.kt
kotlin/components/Icon.kt
  1. Update the com.esuiss.ui package names to match your project.

Usage

import { RadialChartDefault } from "@/components/charts/radial-chart-default"
<RadialChartDefault />
import SwiftUI

struct RadialExample: View {
  var body: some View {
    RadialChartDefault()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartDefault

@Composable
fun RadialExample() {
    RadialChartDefault()
}

Batteries

A row of small battery rings, one per device, that turn red when charge is at or below 20%.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

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

const devices = [
  { name: "Phone", level: 82 },
  { name: "Earbuds", level: 46 },

A row of small battery rings, one per device, that switch from green to red when the charge drops to the low threshold. Use compact rings like these for status at a glance, in widgets, settings pages or device lists.

Replace the devices array with your names and levels from 0 to 100. LOW sets the warning threshold, and the two colors live in the per-ring config. The letter in each ring is the first character of the name. The rings are hidden from assistive technology and have no tooltip, so the percentage and name under each ring carry the information.

Installation

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

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-batteries

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartBatteries } from "@/components/charts/radial-chart-batteries"
<RadialChartBatteries />
Web

Web preview

uniwind/components/charts/radial-chart-batteries.tsx
swift/Charts/RadialChartBatteries.swift
kotlin/charts/RadialChartBatteries.kt

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.

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

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-batteries --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-batteries

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-batteries --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartBatteries } from "@/components/charts/radial-chart-batteries"
<RadialChartBatteries />
import SwiftUI

struct RadialBatteriesExample: View {
  var body: some View {
    RadialChartBatteries()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartBatteries

@Composable
fun RadialBatteriesExample() {
    RadialChartBatteries()
}

Gauge

A 240-degree gauge arc showing an air quality reading with its value and rating below the center.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

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

const chartData = [{ name: "value", value: 38, fill: "var(--color-value)" }]

const chartConfig = {

A gauge-style arc that opens at the bottom, showing a single reading with its value and rating in the center. Use it for scores with a known range, such as air quality, health scores or credit utilization.

Set the reading in chartData and the scale through the domain on PolarAngleAxis. The number and rating in the center are static text, so keep them in sync with the value. Change the color in chartConfig, or pick it from the value to signal good and bad ranges. There is no tooltip.

Installation

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

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-gauge

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartGauge } from "@/components/charts/radial-chart-gauge"
<RadialChartGauge />
Web

Web preview

uniwind/components/charts/radial-chart-gauge.tsx
swift/Charts/RadialChartGauge.swift
kotlin/charts/RadialChartGauge.kt

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.

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.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-gauge --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-gauge

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-gauge --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartGauge } from "@/components/charts/radial-chart-gauge"
<RadialChartGauge />
import SwiftUI

struct RadialGaugeExample: View {
  var body: some View {
    RadialChartGauge()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartGauge

@Composable
fun RadialGaugeExample() {
    RadialChartGauge()
}

Interactive

A weekly activity view where picking a day animates three large rings and updates each ring's totals.

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

import * as React from "react"

import { Card, CardContent, CardHeader } from "@/components/ui/card"
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"

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

const RINGS: {
  key: Ring
  label: string
  unit: string
  goal: number
  color: string
}[] = [

An activity summary with a strip of seven day buttons, each showing mini rings, and large Move, Exercise and Stand rings that fill to the selected day's values. Totals and goal progress for each ring update next to it. Use it as a pattern for daily goals that readers browse day by day.

Replace WEEK with your days and values, one number per ring in the order of RINGS, and edit RINGS for labels, units, goals and colors. The selected state sets the first selected day. The rings are plain SVG, not a Recharts chart, so there is no tooltip; values beyond the goal show a full ring while the text reports the real percentage. Day buttons work with the keyboard, the totals are announced through a live region, and the fill animation respects reduced motion.

Installation

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

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-interactive

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

Web preview

uniwind/components/charts/radial-chart-interactive.tsx
swift/Charts/RadialChartInteractive.swift
kotlin/charts/RadialChartInteractive.kt

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.

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

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-interactive --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-interactive

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-interactive --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

struct RadialInteractiveExample: View {
  var body: some View {
    RadialChartInteractive()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartInteractive

@Composable
fun RadialInteractiveExample() {
    RadialChartInteractive()
}

Label

Concentric radial bars with each category's name printed at the start of its bar.

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

import { LabelList, RadialBar, RadialBarChart } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,

Concentric radial bars with each category name printed at the start of its bar. Pick it over the default radial chart when you want readers to identify bars without a legend or tooltip.

Replace chartData and add each category key with its label and color to chartConfig; the bar labels read from there. startAngle and endAngle set how far the longest bar sweeps, and barSize makes room for longer names. Labels sit inside the bars, so very short bars may not fit their name.

Installation

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

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-label

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartLabel } from "@/components/charts/radial-chart-label"
<RadialChartLabel />
Web

Web preview

uniwind/components/charts/radial-chart-label.tsx
swift/Charts/RadialChartLabel.swift
kotlin/charts/RadialChartLabel.kt

A RadialBarChart with one bar per record in chartData, sweeping from 90 to -200 degrees. Bars are colored through Cell and labeled with a LabelList that reads names from chartConfig. Pressing a bar shows a tooltip.

Replace chartData with your records and add a matching entry per item to chartConfig, whose colors the Cell children read. The component takes no props.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-label --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-label

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-label --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartLabel } from "@/components/charts/radial-chart-label"
<RadialChartLabel />
import SwiftUI

struct RadialLabelExample: View {
  var body: some View {
    RadialChartLabel()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartLabel

@Composable
fun RadialLabelExample() {
    RadialChartLabel()
}

Progress

A three-quarter arc tracking progress toward a goal, with the count shown in the center.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

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

const chartData = [{ name: "value", value: 64, fill: "var(--color-value)" }]

const chartConfig = {

A three-quarter arc tracking progress toward a goal, with the count shown in the center. Use it for goals with a clear finish line, like a reading challenge or a savings target.

Set the progress as a percentage in chartData, or set the domain on PolarAngleAxis to your goal and pass the raw count. The center text and caption are static, so update them with the value, and set the color in chartConfig. There is no tooltip.

Installation

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

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-progress

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartProgress } from "@/components/charts/radial-chart-progress"
<RadialChartProgress />
Web

Web preview

uniwind/components/charts/radial-chart-progress.tsx
swift/Charts/RadialChartProgress.swift
kotlin/charts/RadialChartProgress.kt

A RadialBarChart drawn from 225 to -45 degrees, with one value on a 0 to 100 PolarAngleAxis over a tinted track. The "16 / 25" count and caption are Text layered in the center. Nothing is interactive.

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.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-progress --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-progress

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-progress --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartProgress } from "@/components/charts/radial-chart-progress"
<RadialChartProgress />
import SwiftUI

struct RadialProgressExample: View {
  var body: some View {
    RadialChartProgress()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartProgress

@Composable
fun RadialProgressExample() {
    RadialChartProgress()
}

Rings

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

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.

Edit the rings array with your labels, values, goals and colors; each ring fills by value divided by goal, and a value above its goal shows a closed ring with no second lap. SIZE and BAR set the overall size and ring thickness. The graphic is exposed as an image with a label that lists each ring's value and goal.

Installation

$ 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

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

Web preview

uniwind/components/charts/radial-chart-rings.tsx
swift/Charts/RadialChartRings.swift
kotlin/charts/RadialChartRings.kt

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.

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

Installation

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

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

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

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

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

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

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

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

struct RadialRingsExample: View {
  var body: some View {
    RadialChartRings()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartRings

@Composable
fun RadialRingsExample() {
    RadialChartRings()
}

Stacked

A half-circle arc with two series stacked end to end and the combined total beneath it.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,

A half-circle arc where two series sit end to end and the combined total appears beneath. Use it to show a split of one total, like desktop versus mobile visitors, in a compact space.

Set your series values in visitors, add a label and color for each key to chartConfig, and add one RadialBar per series with the same stackId. The arc's scale is the total, so the bars always fill it. The tooltip shows both values whichever segment you hover.

Installation

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

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-stacked

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartStacked } from "@/components/charts/radial-chart-stacked"
<RadialChartStacked />
Web

Web preview

uniwind/components/charts/radial-chart-stacked.tsx
swift/Charts/RadialChartStacked.swift
kotlin/charts/RadialChartStacked.kt

A RadialBarChart drawn from 180 to 0 degrees, with two RadialBar series sharing a stackId on a domain equal to their sum. chartData is a single record with desktop and mobile counts, and the total is Text under the arc. Pressing the arc shows a tooltip.

Replace the counts in visitors; the total and domain follow. Rename the series in chartConfig and in the RadialBar dataKey and fill props. The component takes no props.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-stacked --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-stacked

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-stacked --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartStacked } from "@/components/charts/radial-chart-stacked"
<RadialChartStacked />
import SwiftUI

struct RadialStackedExample: View {
  var body: some View {
    RadialChartStacked()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartStacked

@Composable
fun RadialStackedExample() {
    RadialChartStacked()
}

Text

A single full-circle progress ring with a percentage and caption centered inside.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

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

const chartData = [{ name: "value", value: 72, fill: "var(--color-value)" }]

const chartConfig = {

A single full-circle progress ring with a percentage and caption centered inside. Use it for one headline ratio, such as storage used or a completion rate.

Set the value in chartData and keep the domain on PolarAngleAxis at your maximum. The percentage and caption in the center are static text, so update them with the value, and change the color in chartConfig. There is no tooltip.

Installation

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

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-text

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

Web preview

uniwind/components/charts/radial-chart-text.tsx
swift/Charts/RadialChartText.swift
kotlin/charts/RadialChartText.kt

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.

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.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-text --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-text

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-text --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

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

struct RadialTextExample: View {
  var body: some View {
    RadialChartText()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartText

@Composable
fun RadialTextExample() {
    RadialChartText()
}

Tinted

Concentric radial bars whose unfilled track is a soft tint of each bar's own color.

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

import { PolarAngleAxis, RadialBar, RadialBarChart } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,

Concentric radial bars where the unfilled part of each track is a soft tint of the bar's own color instead of neutral gray. Choose it over the default radial chart for a more colorful look that still shows how far each bar has to go.

Replace chartData and add each category to chartConfig; the tinted tracks are built from the same data. Set MAX to the value that closes a full ring, at or above your largest value. The tracks are a second chart behind the real one, hidden from assistive technology, so change the sizing of both together.

Installation

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

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-tinted

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartTinted } from "@/components/charts/radial-chart-tinted"
<RadialChartTinted />
Web

Web preview

uniwind/components/charts/radial-chart-tinted.tsx
swift/Charts/RadialChartTinted.swift
kotlin/charts/RadialChartTinted.kt

A RadialBarChart with one bar per record in chartData, measured against a shared MAX of 320. Each bar is colored through Cell, and its background track uses the same color at low opacity. Pressing a bar shows a tooltip. The bars set isAnimationActive={false} and draw without the enter animation.

Replace chartData with your records, set MAX to the top of your range, and add a matching entry per item to chartConfig. The component takes no props.

Installation

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

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

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

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-tinted --platform swift
$ pnpm dlx shadcn@latest add @esuiss/radial-chart-tinted

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

$ pnpm dlx @esuiss/ui@latest add charts radial-chart-tinted --platform kotlin

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

Follow the manual steps under Default and copy this variant's source instead.

Usage

import { RadialChartTinted } from "@/components/charts/radial-chart-tinted"
<RadialChartTinted />
import SwiftUI

struct RadialTintedExample: View {
  var body: some View {
    RadialChartTinted()
  }
}
import androidx.compose.runtime.Composable
import com.esuiss.ui.charts.RadialChartTinted

@Composable
fun RadialTintedExample() {
    RadialChartTinted()
}
NextTooltip ChartPreviousRadar Chart

On this page

  1. 01Default
  2. 02Batteries
  3. 03Gauge
  4. 04Interactive
  5. 05Label
  6. 06Progress
  7. 07Rings
  8. 08Stacked
  9. 09Text
  10. 10Tinted