Radial chart
Compare progress across a small set of measures using one shared maximum.
- Research
- Design
- Build
- Value
- 74%
View data table 3 rows
| Data point | Value |
|---|---|
| Research | 74% |
| Design | 58% |
| Build | 86% |
Installation
bunx --bun shadcn@latest add https://apple-ui-eduardo.vercel.app/r/radial-chart.jsonThe registry includes the shared styles and dependencies. Import @/components/apple-ui/styles.css in your root layout once. For the package route, use the installation guide.
Usage
"use client";
import { RadialChart } from "@eduardoul/apple-ui";
const data = [
{ label: "Research", value: 74 },
{ label: "Design", value: 58 },
{ label: "Build", value: 86 },
];
export function Example() {
return (
<RadialChart
title="Milestone progress"
description="Synthetic progress percentages"
data={data}
max={100}
valueFormatter={(value) => value + "%"}
/>
);
}Package imports use @eduardoul/apple-ui. Registry imports use @/components/apple-ui. Add "use client" to files that use state or event handlers.
API reference
| Property | Type | Default |
|---|---|---|
| data | ChartDatum[] | required |
| valueKey | string | value |
| labelKey | string | label |
| max | number | largest value |
| title | string | required |
| description | string | undefined |
| height | number | component default |
| loading | boolean | false |
| error | string | undefined |
| emptyMessage | string | No data to display. |
| showTable | boolean | true |
| compact | boolean | false |
| valueFormatter | (value: number) => string | localized number |
| className | string | undefined |
| style | React.CSSProperties | undefined |
Use className and style to customize the component. The package includes full TypeScript definitions for its supported element properties and refs.
Design guidance
- Use comparison arcs for a few progress measures that share one target.
- Set max to a known goal so the arc communicates the same scale across updates.
- Values can be zero. The shared maximum must be positive and at least as large as every value.
- Use a bar chart when readers need to compare many items or small differences.
Accessibility
Give the chart a descriptive title and explain its units. Select a data point to read its values, or open the data table for the full dataset. Labels and values accompany color, and the chart adapts to reduced motion and appearance preferences. Test long labels, touch input and keyboard navigation with your own data.
Library styles support reduced motion, reduced transparency, increased contrast and forced colors. Read the accessibility foundation for the checks your application still needs.