suiss/uim · Chart

Radial Chart Stacked

A half-circle arc stacking desktop and mobile visitors, with the total below it.

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

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.

Installation

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

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

uniwind/components/charts/radial-chart-stacked.tsx
import { View } from "react-native"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  PolarAngleAxis,
  RadialBar,
  RadialBarChart,
  1. Update the import paths to match your project.

Usage

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

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.