Dune Charts

Pie chart

Part-to-whole wedges or a donut ring.

Use pie charts for part-to-whole shares. One <DunePieChart.Pie /> defines value and name keys. Colors follow config keys that match each row's nameKey.

PieShare as pixel wedges.

Examples

Donut

Set innerRadius on <DunePieChart.Pie /> (number or percent string such as "55%").

DonutPixel donut via innerRadius.

Loading

Set loading on the root to show a pixel skeleton until data is ready.

Loading…

Parts

PartRole
DunePieChartRoot: data, config, loading
DunePieChart.TooltipHover tooltip
DunePieChart.LegendSlice legend
DunePieChart.PieGeometry: dataKey, nameKey, radii, labels

Props

Root

PropTypeDefaultNotes
dataRecord<string, unknown>[]requiredOne row per slice
configRecord<string, DuneSeriesConfig>-Keys match nameKey values
loadingbooleanfalsePixel skeleton
emptyMessagestring-Empty-state copy
chartPropsobject-Extra Recharts PieChart props
classNamestring-Wrapper class

Pie

PropTypeNotes
dataKeystringNumeric value field
nameKeystringSlice id field (matches config keys)
innerRadiusnumber | stringDonut hole size
outerRadiusnumber | stringOuter edge
paddingAnglenumberGap between slices
labelboolean | functionSlice labels
isAnimationActivebooleanSlice animation

Tips

  • Keep slice ids stable and match them in config for labels and colors.
  • Prefer a donut when you need center space for a total or short label (add that UI yourself).
  • Pie does not use root fill / pixel. Slice styling follows Recharts plus theme colors.

On this page