# RadialBarChart Compare independent quantities as concentric arcs on a common scale. [Interactive guide](/docs/components/radialbarchart) · Forge 3.2.0 Use the API for your installed version. Run `npx --no-install wss3-forge api --json` inside the project. ## Implementation guidance ### When to use it Use RadialBarChart for several independent values on a common scale. Use ProgressRing for a single completion percentage. ### How to compose it Use explicit bounds when comparing multiple charts or progress against the same target. Use a signed domain for gains and losses. ### What to verify Verify the common zero and range are clear. Provide a table when a precise reading or a missing measurement matters. ## Usage ```tsx import { RadialBarChart } from 'wss3-forge' import type { RadialBarChartDatum, RadialBarChartProps } from 'wss3-forge' ``` - Each arc measures a value on the same domain. Set explicit bounds to compare charts or display progress toward the same target. - Use a signed domain to show gains and losses from a common zero. The optional data table includes missing measurements. - Configure startAngle and sweepAngle when the arcs need to occupy part of a circle. Add showTable when readers need the full list of measurements. ```tsx ``` ## Runnable examples ### Progress on a zero-to-100 scale ```tsx import { RadialBarChart } from 'wss3-forge' import type { RadialBarChartDatum } from 'wss3-forge' const adoption: RadialBarChartDatum[] = [ { label: 'Accounts', value: 82 }, { label: 'Billing', value: 69 }, { label: 'Reporting', value: 54 }, ] export default function Example() { return ( `${value}%`} valueLabel="Adoption" />) } ``` ### Signed changes by region ```tsx import { RadialBarChart } from 'wss3-forge' import type { RadialBarChartDatum } from 'wss3-forge' const changes: RadialBarChartDatum[] = [ { label: 'North', value: 14 }, { label: 'South', value: -8 }, { label: 'East', value: 0 }, { label: 'West', value: null }, ] export default function Example() { return () } ``` ## Root package API ### RadialBarChart Compare independent quantities as concentric arcs on a common scale. Props type: `RadialBarChartProps` - `data` — `readonly RadialBarChartDatum[]` Named values and optional colors for the rings. - `domain?` — `ChartDomain` Minimum and maximum shared by the arcs. - `startAngle?` — `number` Default `-135`. Angle measured clockwise from the top of the chart. - `sweepAngle?` — `number` Default `270`. Clockwise span from 1 to 360 degrees. - `showTracks?` — `boolean` Default `true`. Show each ring’s full range behind its value. - `className?` — `string` - `style?` — `CSSProperties` - `title` — `string` - `size?` — `number` - `summary?` — `string` - `showLegend?` — `boolean` - `showTooltip?` — `boolean` - `showTable?` — `boolean` Default `false`. Offer a disclosure with the source values. - `emptyLabel?` — `string` Default `'No data to display.'`. - `categoryLabel?` — `string` Default `'Category'`. - `unit?` — `string` - `formatValue?` — `(value: number) => string` - `innerRadiusRatio?` — `number` Default `0.3`. Donut hole as a fraction of the outside radius. - `valueLabel?` — `string` Default `'Value'`. ## Related types ```ts export type RadialBarChartDatum = PieChartDatum export interface PieChartDatum { label: string value: number | null | undefined color?: string } export type ChartDomain = readonly [min: number, max: number] export interface RadialBarChartProps extends Omit { data: readonly RadialBarChartDatum[] domain?: ChartDomain /** Angle measured clockwise from the top of the chart. */ startAngle?: number /** Clockwise span from 1 to 360 degrees. */ sweepAngle?: number showTracks?: boolean } export interface PieChartProps extends RadialChartPresentation { data: readonly PieChartDatum[] variant?: 'pie' | 'donut' /** Donut hole as a fraction of the outside radius. */ innerRadiusRatio?: number /** Content centered inside the donut hole. */ centerContent?: ReactNode /** Place the legend below the chart or beside it when space permits. */ legendPlacement?: 'below' | 'beside' /** Animate the entrance unless reduced motion is requested. */ animated?: boolean categoryLabel?: string valueLabel?: string unit?: string formatValue?: (value: number) => string } ```