DonutChart

A donut (or pie) chart for part-to-whole proportions across named slices.

Installation

npx dafink-ui add donut-chart

Requires: recharts

Demo

Props

NameTypeDefaultDescription
dataDonutSlice[]-Array of { label, value, color? } slices.
innerRadiusnumber0.65Inner radius as a fraction of outer. 0 = pie chart.
heightnumber240Chart height in px.
showLegendbooleantrueWhether to show the legend.
classNamestring""Extra classes applied to the container.