Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Radial chart

Daily rhythms, categories and seasonal data around a circle, drawn as dots, bars, lines or areas. The center reads out whichever bin the pointer is on.

On this page18 sections

Preview

Preview width

Installation

The command adds the example above to components/charts/ and, the first time, the chart kit to components/ui/charts/. Both are source files in your project from then on: read them, change them, delete what you don't use.

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

Usage

Pass one row per bin, clockwise from midnight, and a series array naming the keys to draw. The default angle is a 24-hour clock, so 24 rows are hours and 96 are quarter hours.

import {
  RadialAxis,
  RadialBar,
  RadialCenter,
  RadialChart,
} from "@/components/ui/charts";

const orders = [
  2, 1, 0, 0, 1, 3, 12, 34, 58, 61, 47, 52, 66, 59, 41, 38, 44, 50, 36, 22,
  14, 9, 5, 3,
];

const data = orders.map((count, hour) => ({
  orders: count,
  time: `${String(hour).padStart(2, "0")}:00`,
}));

const series = [{ dataKey: "orders", label: "Orders" }];

export const OrdersClock = () => (
  <RadialChart ariaLabel="Orders by hour today" data={data} series={series}>
    <RadialAxis />
    <RadialBar cornerRadius={3} />
    <RadialCenter defaultLabel="Orders today" />
  </RadialChart>
);

Anatomy

RadialChart measures itself and owns the scales. The layers draw in the order you write them, RadialCenter sits in the hole as HTML and RadialLegend goes under the chart.

<RadialChart data={data} series={series}>
  <RadialAxis />
  <RadialBar cornerRadius={4} ghostDataKey="yesterday" />
  <RadialScrubber />
  <RadialCenter defaultLabel="Pull requests today" />
  <RadialLegend />
</RadialChart>
  • RadialChart: The rows, the series, what the angle means (angleType) and the arc to draw on.
  • RadialAxis: The center circle, the ticks and labels around it, and value rings with valueTicks.
  • RadialDotBar: Each bin as a column of dots, series stacked outward.
  • RadialBar: Each bin as a bar growing out from the center circle, series stacked.
  • RadialRingBar: One ring per row whose values sweep along the arc, for orientation="angular".
  • RadialLine: One key as a smooth line around the circle.
  • RadialArea: Every series as stacked areas, or one filled band between two keys.
  • RadialScrubber: The line from the center to the hovered bin. On a clock it rests at the current time.
  • RadialCenter: The total at rest and the hovered bin's value, in the hole.
  • RadialLegend: One row per series with its total. Hovering a row fades the other series.

Clock, categories or dates

angleType says what the angle means. "clock", the default, spreads the rows over 24 hours and labels 00, 06, 12 and 18. "band" gives each row an equal slice labeled from xDataKey, and "time" reads a date from each row and labels the months.

Band labels run along the radius. When there are many, labelEvery={2} on <RadialAxis> keeps every other one, and maxValue="stacked" on the chart gives the axis a scale for its value rings.

Preview width

Today so far

A clock chart tracks now: the rows after the last one with data are the future. Name a comparison key in ghostDataKey and those bins show it dimmed, here yesterday's count for the rest of today.

RadialScrubber rests on now and swings to the hovered bin on a spring. Pass rest="hidden" to show it only on hover, or trackNow={false} to the chart to treat every row as past.

Preview width

Half circles and progress rings

startAngle and endAngle are in degrees, 0 at 12 o'clock, unlike the ring chart's radians. -90 to 90 is the top half, and fitArc crops the chart to the arc, so a semicircle is about twice as wide as it is tall.

With orientation="angular", each row becomes a ring and its values sweep along the arc. Draw it with <RadialRingBar>, and space stacked series with segmentGap.

Preview width

Lines, areas and ranges

RadialLine draws one key. A key that isn't a series, such as yesterday, becomes a comparison line, and dash makes it dashed.

RadialArea stacks every series by default. Give it a dataKey and a baseDataKey and it fills between the two instead, a record low and high for instance. For values that don't start at zero, minValue="auto" maps the lowest one to the base.

Preview width

Dots and patterns

RadialDotBar draws each column as rows of dots, 14 of them by default. layout="columns" lines up one dot per bin on every row, and patterns fills a series' dots with a preset such as "diagonal-up", keyed by its dataKey.

annotations puts a callout outside a bin's tip.

Preview width

Numbers beside the chart

hoveredIndex and onHoverChange make the hover controlled, so numbers next to the chart can follow it. A small clock in a card reads better without the resting scrubber, so pass it rest="hidden".

Preview width

Customization

The kit is in your project, in components/ui/charts/: your framework's components over a shared core/. Change a default there and every chart picks it up.

className goes on the chart's container, so size and spacing are utility classes.

With no children, RadialCenter shows the sum of every series under defaultLabel and, on hover, the bin's sum under its label. Give it a function as its child to render both states yourself. It gets the hovered index, datum and label (all null at rest), each series' totals and the bin's values.

The layers are styled with props: cornerRadius, stackGap and fadedOpacity on RadialBar, rows and dotSize on RadialDotBar, variant on the scrubber. A layer with its own maxValue stops sharing the chart's scale.

<RadialCenter>
  {({ label, totals, values }) => (
    <div className="text-center">
      <div className="font-semibold text-3xl tabular-nums">
        {label ? values.orders : totals.orders}
      </div>
      <div className="text-muted-foreground text-xs">
        {label ?? "Orders today"}
      </div>
    </div>
  )}
</RadialCenter>

Where a part renders content of its own, you pass it in. In React:

  • RadialCenter: {({ index, datum, label, isFuture, totals, values }) => …}

Loading state

Radial charts have no loading state. Render a Skeleton in the chart's place until the rows arrive. The chart is as wide as its container, up to maxWidth (640 px), and square on a full circle.

Animation

Every layer has its own entrance, timed to the others: the axis rings scale in, bars and dots rise from the center bin by bin around the clock, lines draw clockwise and areas sweep round. Ring bars grow their tracks first, then sweep their values in.

enterDelay on a RadialLine holds its draw back, in seconds. animate={false} on the chart turns every entrance off, and reduced motion does the same.

Preview width

Theming

Every color in the kit is one of your theme's tokens or a mix of them, except --chart-positive, a fixed green. A preset or the .dark class restyles the chart, and overriding a token in your CSS changes it everywhere.

Series take --chart-1 to --chart-5 by their order in series, unless they set a color.

The axis, the scrubber and the ghost bins use your theme's --foreground, each at its own opacity, and the axis labels --muted-foreground. Each has a prop to change it: stroke and labelColor on the axis, color on the scrubber, ghostColor on a layer.

TokenDefaultPaints
--chart-1your theme'sthe first series
--chart-2your theme'sthe second series
--chart-3your theme'sthe third series
--chart-4your theme'sthe fourth series
--chart-5your theme'sthe fifth series
globals.css
:root {
  --chart-label: var(--foreground);
}

Accessibility

The chart is an image named by ariaLabel ("Radial chart" by default). Say what a full turn covers in it, a day or a year, since the shape alone doesn't.

Keyboard focus moves through the bins in order and does what hover does: the scrubber swings to the bin and RadialCenter shows it.

Tab
Moves focus to the chart, on the first bin.
Arrow Right
Moves to the next bin, clockwise. ArrowDown does the same.
Arrow Left
Moves to the previous bin. ArrowUp does the same.
Home
Jumps to the first bin.
End
Jumps to the last bin.

FAQ

When should I use a radial chart instead of a bar, line or radar chart?

Use a radial chart when the data runs in a cycle and the end meets the start: the hours of a day, the months of a year. It also packs many categories into a compact figure, such as fifty states around one circle.

Lengths are harder to compare around a circle than along a straight axis, so pick a bar or line chart when exact comparison matters. A radar chart is a different thing: a few profiles scored on the same measures. For a few goals with their own targets use a ring chart, and for one reading a gauge.

What data does the radial chart need?

An array of rows, one per bin, in clockwise order from the start angle, and a series array that names the keys to draw. Each series has a dataKey and can set a label and a color, so another series is one more key on the rows and one more entry in series.

xDataKey, time by default, names the field with the bin's label, category or date. With the default 24-hour clock the rows are spread over a day, so 24 rows are hours and 96 are quarter hours.

How do I plot categories or dates on a radial chart instead of a 24-hour clock?

Set angleType on <RadialChart>. "band" gives each row an equal slice, and <RadialAxis> labels it with the row's value under xDataKey. "time" reads a Date, a timestamp or an ISO string from that key, one per evenly spaced bin, and the axis draws time ticks such as month names.

With many categories, labelEvery={2} on <RadialAxis> keeps every other label and labelFormat rewrites them. For dates, timeTicks and timeTickFormat set the ticks and their text.

Should I use bars, dots, a line or an area on a radial chart?

Each is a layer you put inside the chart, and they draw in the order you write them. <RadialBar> grows a bar out from the center for each bin and stacks the series, and <RadialDotBar> draws the same columns as rows of dots, 14 by default.

<RadialLine> draws one key as a smooth line, which suits a continuous measure or a comparison such as yesterday. <RadialArea> stacks every series as areas, or fills a band between a dataKey and a baseDataKey for a range such as a low and a high.

Layers combine: a range band under a line is two children.

How do I compare today with yesterday on a radial clock chart?

A clock chart tracks now: rows where no series has a value yet are the future, and the last row with data is the current bin. Leave the series keys null in the rows that haven't happened.

Put yesterday's numbers on the same rows under their own key and name it in ghostDataKey on the bar, dot or area layer, and the future bins show yesterday dimmed. For the whole day, add <RadialLine dataKey="yesterday" dash /> as a dashed comparison line.

<RadialScrubber> rests on now, and trackNow={false} on the chart treats every row as past.

How do I make a half-circle radial chart or stacked progress rings?

startAngle and endAngle on <RadialChart> are in degrees, 0 at 12 o'clock and clockwise, so -90 to 90 is the top half. fitArc, on by default, crops the chart to the arc, which makes a semicircle about twice as wide as it is tall.

For progress rings, set orientation="angular" and draw with <RadialRingBar>. Each row becomes a ring, the first innermost, and its series sweep along the arc end to end, up to maxValue. segmentGap spaces the segments, and a faint track behind each ring shows what is left.

The chart is as wide as its container, up to maxWidth (640 px).

How do I show the hovered value in the center of a radial chart?

Add <RadialCenter>. With no children it shows the sum of every series, with defaultLabel under it, and on hover the hovered bin's sum over that bin's label. The radial chart has no tooltip, so the center is where values are read.

For your own content, give it a function as its child. It receives the hovered index, datum and label, all null at rest, plus each series' totals and the hovered bin's values.

To follow the hover outside the chart, pass hoveredIndex and onHoverChange to <RadialChart>.

How do I put every layer of a radial chart on the same value scale?

Set maxValue on <RadialChart>. Without it each layer scales itself, so a line and the bars behind it may not share a scale. A number sets the value at the top of the band, "auto" uses the largest single value and "stacked" the largest sum in one bin.

The shared scale also drives the value rings: valueTicks on <RadialAxis> draws them and valueTickFormat writes their labels. For values that don't start at zero, such as temperatures, minValue="auto" maps the smallest one to the base of the band.

Which frameworks does the radial chart support?

React, Vue, Svelte and Solid. One core on TanStack Charts draws the radial chart in each, so the components and props on this page are the same everywhere, and switching framework at the top of the page changes the preview, the code and the install command.

Only the spelling follows the framework: class for className outside React, scoped slots for render props in Vue and snippets in Svelte.

How do I add the radial chart to my project?

Sign in, then copy the command under Installation: npx shadcn@latest add with the chart's URL. It adds the example at the top of this page as components/charts/chart-radial-default, the chart kit to components/ui/charts the first time you install a chart, and @tanstack/charts.

Both are source files in your project from then on. Swap the sample rows for your own data and change whatever you need.

Is the radial chart free?

Yes. The radial chart and every example of it are free to use in personal and commercial projects. Seeing the code and installing it takes a free account, one tap with Google or GitHub.

The charts are bklit's (bklit-ui, MIT), rebuilt on TanStack Charts and drawn in your shadcn/ui theme's tokens.

API reference

RadialChart

PropType
datareadonly Record<string, unknown>[]

One datum per angular bin, clockwise from the start angle (96 × 15 minutes, say).

Type
readonly Record<string, unknown>[]
xDataKey?string

Datum key with the bin label, category or time.

Default
"time"
seriesreadonly RadialSeries[]

Series, innermost (first stacked) first.

layout?Partial<RadialLayout>

Override ring radii (fractions of the chart radius).

Type
Partial<RadialLayout>
angleType?RadialAngleType

What the angle encodes.

Default
"clock"
orientation?RadialOrientation

Bins along the angle, or as concentric rings.

Default
"radial"
startAngle?number

Arc start in degrees, 0 at 12 o'clock, clockwise.

Default
0
endAngle?number

Arc end in degrees.

Default
startAngle + 360 (the full circle)
fitArc?boolean

Crop the stage to the arc's bounding box for partial arcs (a semicircle is about twice as wide as tall).

Default
true
trackNow?boolean

Track "now": bins after the last bin with data are future bins (ghost data; the scrubber rests at now).

Default
true for clock charts
nowIndex?number

The bin the resting scrubber points at.

Default
the last bin with data
maxValue?RadialMaxValue

Shared value scale for every layer without its own maxValue (it also drives RadialAxis value rings). Unset, each layer scales itself (angular charts default to "stacked").

minValue?number | "auto"

Value mapped to the band base; "auto" is the smallest value.

Type
number | "auto"
Default
0
valueKeys?readonly string[]

Extra datum keys (not series) in the automatic domain, "yesterday" say.

niceValues?boolean

Round an automatic domain to nice tick values.

Default
true
ringGap?number

angular orientation: the gap between rings as a fraction of a ring step.

Default
0.3
animate?boolean

Enter animations; skipped under prefers-reduced-motion.

Default
true
hoveredIndex?number | null

Controlled hovered bin: null is "nothing hovered", absent leaves the hover to the chart.

Type
number | null
onHoverChange?(index: number | null) => void

Called with the hovered bin (pointer or keyboard), and null when the hover leaves.

Type
(index: number | null) => void
maxWidth?number

Maximum chart width in px.

Default
640
className?string

Class names on the chart's outer element.

ariaLabel?string

Accessible name of the chart.

Default
"Radial chart"
ariaDescription?string

Longer accessible description of the chart.

children?ReactNode

The chart's layers (RadialAxis, RadialDotBar, RadialBar, RadialRingBar, RadialLine, RadialArea, RadialScrubber), drawn in a group centred on the chart in the order given; RadialCenter draws as HTML in the hole and RadialLegend below the chart.

RadialAxis

PropType
showCircle?boolean

Centre circle with a thin stroke.

Default
true
centerGradient?boolean

Faint radial-gradient fill inside the centre circle.

Default
false
tickCount?number

Tick marks just outside the centre circle.

Default
24 for clock charts, else 0
majorTickEvery?number

Every n-th tick is long.

Default
6 (00 / 06 / 12 / 18)
labels?readonly string[] | false

Labels spaced evenly along the arc from the start angle, or false to hide them. Defaults to 00 / 06 / 12 / 18 (clock), every category (band), time ticks (time) or value ticks (angular).

Type
readonly string[] | false
labelColor?string

Label colour.

Default
"var(--muted-foreground)"
stroke?string

Circle, tick and grid colour.

Default
"var(--foreground)"
labelOrientation?RadialLabelOrientation

Label orientation.

Default
"radial" for band charts, else "horizontal"
labelRadius?number

Label radius as a fraction of the chart radius. Defaults to layout.axisLabel (rotated band labels start just outside the band).

labelEvery?number

Band charts: label every n-th category.

Default
1
labelFormat?(value: unknown, index: number) => string

Band charts: formats datum[xDataKey]. Defaults to String(value).

Type
(value: unknown, index: number) => string
timeTicks?number | readonly (Date | number)[]

Time charts: a tick count hint, or explicit tick times.

Type
number | readonly (Date | number)[]
Default
12
timeTickFormat?(date: Date) => string

Time charts: the tick label format. Defaults to the short month (UTC) for spans over 60 days.

Type
(date: Date) => string
timeLabelPosition?"tick" | "between"

Time charts: the label at the tick, or centred between ticks (month names in the middle of their month).

Type
"tick" | "between"
Default
"between"
angleGrid?boolean

Spokes across the value band at every angle tick (time ticks, or value ticks on angular charts).

Default
true for time and angular charts
valueTicks?number | readonly number[]

Value grid: a tick count hint or explicit values. Radial charts draw a ring (an arc on partial charts) per value; angular charts use them as the angle ticks. Defaults to none on radial charts and 5 on angular charts.

Type
number | readonly number[]
valueTickFormat?(value: number) => string

Value tick label format. Defaults to an en-US number.

Type
(value: number) => string
showValueLabels?boolean

Show value tick labels.

Default
true
valueLabelAngle?number

Radial charts: the angle (degrees) the value labels sit at. Defaults to the start angle.

showRingLabels?boolean

Angular charts: category labels at the start of each ring.

Default
true
gridOpacity?number

Grid ring and spoke opacity.

Default
0.12

RadialDotBar

PropType
ghostDataKey?string

Datum key of a comparison value (yesterday's total, say), drawn as dim "ghost" dots in bins where no series has a value.

ghostColor?string

Ghost dot colour.

Default
"var(--foreground)"
ghostOpacity?number

Ghost dot opacity.

Default
0.22
maxValue?number

Value mapped to the outermost row. Defaults to the largest stack or ghost value.

rows?number

Concentric rows across the value band.

Default
14
layout?RadialDotLayout

Dot placement on each row.

Default
"grid"
dotSize?number

Dot diameter as a fraction of the row spacing.

Default
0.44
ghostDotSize?number

Ghost dot diameter as a fraction of the row spacing.

Default
0.26
rampExtent?number

Fraction of the rows over which rampFrom series reach full opacity.

Default
0.5
annotations?readonly RadialDotBarAnnotation[]

Callout labels outside a bin's tip.

Type
readonly RadialDotBarAnnotation[]
fadedOpacity?number

Opacity of the other series while a legend item is hovered.

Default
0.2
patterns?Readonly<Record<string, RadialPatternPresetId | RadialDotPattern>>

Pattern fills keyed by series dataKey ("ghost" for the ghost layer): a preset id or a RadialDotPattern. Series without one stay solid.

Type
Readonly<Record<string, RadialPatternPresetId | RadialDotPattern>>

RadialBar

PropType
ghostDataKey?string

Datum key of a comparison value (yesterday's total, say), drawn as a dim "ghost" bar in bins where no series has a value.

ghostColor?string

Ghost bar colour.

Default
"var(--foreground)"
ghostOpacity?number

Ghost bar opacity.

Default
0.12
maxValue?number

Value mapped to the band top. Defaults to the chart's shared scale when RadialChart has maxValue, else the largest stack or ghost value.

padAngle?number

Angular gap between neighbouring bars in radians, held at a constant width from the band base outward. Defaults to 18% of one bin's angle.

cornerRadius?number

Corner radius in px.

Default
0
stackGap?number

Radial gap in px between stacked segments. 0 draws each bin as one solid column whose outline carries cornerRadius; above 0 every segment is rounded on its own.

Default
0
rampExtent?number

Fraction of the band over which rampFrom series reach full opacity.

Default
0.6
fadedOpacity?number

Opacity of the other bins while a bin is hovered.

Default
0.35
seriesFadedOpacity?number

Opacity of the other series while a legend item is hovered.

Default
0.2

RadialRingBar

PropType
maxValue?number

Value mapped to the arc end. Defaults to the chart's value domain (RadialChart maxValue, else the largest per-ring stack).

cornerRadius?number | "round"

Corner radius in px, or "round" for fully rounded ends.

Type
number | "round"
Default
0
segmentGap?number

Gap between stacked segments in px, constant across the ring's thickness.

Default
0
track?boolean

A faint full-arc track behind every ring.

Default
true
trackColor?string

Track colour.

Default
"var(--foreground)"
trackOpacity?number

Track opacity.

Default
0.06
fadedOpacity?number

Opacity of the other rings while a ring is hovered.

Default
0.35
seriesFadedOpacity?number

Opacity of the other series while a legend item is hovered.

Default
0.2

RadialLine

PropType
dataKeystring

Datum key plotted by this line. A key matching a RadialChart series inherits its colour and opacity and dims with the legend; any other key ("yesterday") draws a comparison line.

stroke?string

Stroke colour. Defaults to the series colour (else its palette slot), else var(--foreground).

strokeWidth?number

Stroke width in px.

Default
2
strokeOpacity?number

Stroke opacity. Defaults to the series opacity, else 1.

dash?boolean | string

Dash pattern: true for strokeWidth dashes with 3× gaps, or any SVG stroke-dasharray. Defaults to solid.

Type
boolean | string
curve?CurveFactory

d3 curve. Defaults to curveCatmullRomClosed for a closed loop, else curveCatmullRom.

closed?boolean

Join the last bin back to the first. Defaults to true when every bin has a value on a full circle.

maxValue?number

Value mapped to the band top. Defaults to the chart's shared scale when RadialChart has maxValue, else the largest value across every series and this line.

showMarkers?boolean

A point marker on the hovered bin, riding the line.

Default
true
markerMotion?RadialDotMotion

How the hover marker follows the pointer: locked to the crosshair, its own spring (markerSpring) or snapping to the bin. Reduced motion always snaps.

Default
"crosshair"
markerSpring?RadialSpringOptions

markerMotion="spring": the marker's spring.

Default
{ stiffness: 240, damping: 24 }
showNowMarker?boolean

A marker at the line's last value ("now"). Defaults to true for open lines.

pulse?boolean

A soft pulse around the "now" marker (off under reduced motion).

Default
true
markerRadius?number

Marker radius in px. Defaults to a size that scales with the chart.

fadedOpacity?number

Opacity while another series is hovered in the legend.

Default
0.2
enterDelay?number

Delay before the clockwise draw starts, in seconds.

Default
0

RadialArea

PropType
dataKey?string

Draw a single area for this datum key (a matching series supplies colour, opacity and legend dimming). Omit to draw every chart series.

baseDataKey?string

Inner edge of a single area (a min/max band, say). Defaults to the band base (0).

stacked?boolean

Series mode: stack the series outward, or overlay them from the base.

Default
true
color?string

Fill and stroke colour of a single area. Defaults to the series colour (else its palette slot), else var(--foreground).

fill?boolean

Draw the fill (false gives an outline-only line).

Default
true
fillOpacity?number

Fill opacity at the outer edge.

Default
0.32
rampFrom?number

Radial gradient: the fraction of fillOpacity at the band base, rising to the full value at the outer radius. Defaults to the series' rampFrom, else 0.25.

stroke?RadialAreaStroke

Which edges get a stroke.

Default
"outer"
strokeWidth?number

Stroke width in px.

Default
1.5
strokeOpacity?number

Stroke opacity.

Default
1
strokeDasharray?string

A dashed edge: "4 4", say.

curve?RadialAreaCurve

The curve through the bin centres.

Default
"catmullRom"
ghostDataKey?string

Datum key of a comparison value (yesterday's total, say), drawn as a dim "ghost" area with a dashed edge in bins where no series has a value.

ghostColor?string

Ghost colour.

Default
"var(--foreground)"
ghostOpacity?number

Ghost fill opacity (its stroke is 2.5× this).

Default
0.1
maxValue?number

Value mapped to the outer radius. Defaults to the chart's shared scale when RadialChart has maxValue, else the largest drawn value.

activeDot?boolean

A dot on the outer edge of the hovered bin, riding the edge.

Default
true
activeDotMotion?RadialDotMotion

How the active dot follows the pointer: locked to the crosshair, its own spring (activeDotSpring) or snapping to the bin. Reduced motion always snaps.

Default
"crosshair"
activeDotSpring?RadialSpringOptions

activeDotMotion="spring": the dot's spring.

Default
{ stiffness: 240, damping: 24 }
fadedOpacity?number

Opacity of the other series while a legend item is hovered.

Default
0.2

RadialScrubber

PropType
variant?RadialScrubberVariant

Line style.

Default
"solid"
dashArray?string

dashed variant: the SVG stroke-dasharray.

Default
"4 4"
showDot?boolean

End dot. Defaults to true for solid and dashed lines, false for the gradient.

color?string

Line and dot colour.

Default
"var(--foreground)"
lineOpacity?number

Line opacity.

Default
0.7
strokeWidth?number

Line width.

Default
1.5
dotRadius?number

End dot radius in px. Defaults to a size that scales with the chart.

rest?"now" | "hidden"

Where the scrubber rests when nothing is hovered: at "now" (the trailing edge of nowIndex) or hidden. Defaults to "now" on charts that track now (clock charts), else "hidden".

Type
"now" | "hidden"
spring?RadialSpringOptions

The spring toward the hovered bin; hover dots locked to the crosshair follow it too.

Default
{ stiffness: 420, damping: 42 }

RadialCenter

PropType
children?(state: RadialCenterState) => ReactNode

Full control over the centre content (at rest and while hovering).

Type
(state: RadialCenterState) => ReactNode
className?string

Class names on the centre's content box.

prefix?string
suffix?string
labelClassName?string

Class names of the label.

valueClassName?string

Class names of the value.

formatOptions?ChartStatFlowFormat

Number format of the value.

defaultLabel?string

The label under the value at rest.

Default
"Total"

RadialLegend

PropType
className?string

Class names on the legend row.

formatValue?(value: number) => string

Formats the per-series totals. Defaults to an en-US integer.

Type
(value: number) => string
showValues?boolean

Show each series' total after its label; turn it off where totals are meaningless (temperatures, say).

Default
true