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.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
Web preview
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
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Apply the Compose compiler plugin, enable Compose, set
compileSdkto 37 or higher andminSdkto 24 or higher, and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Batteries
A row of small battery rings, one per device, that turn red when charge is at or below 20%.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Gauge
A 240-degree gauge arc showing an air quality reading with its value and rating below the center.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Interactive
A weekly activity view where picking a day animates three large rings and updates each ring's totals.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
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
Label
Concentric radial bars with each category's name printed at the start of its bar.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Progress
A three-quarter arc tracking progress toward a goal, with the count shown in the center.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Rings
Three nested activity rings for move, exercise and stand, drawn as plain SVG circles.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Stacked
A half-circle arc with two series stacked end to end and the combined total beneath it.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Text
A single full-circle progress ring with a percentage and caption centered inside.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.
Usage
Tinted
Concentric radial bars whose unfilled track is a soft tint of each bar's own color.
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
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
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
Follow the manual steps under Default and copy this variant's source instead.