KPieChart
fun KPieChart(item: ChartRegistryItem, donut: Boolean = false, centerLabel: String = "", activeSegment: Int = -1, showLabels: Boolean = false, separatorStroke: Float = 2.0f, modifier: Modifier = Modifier)(source)
A fully-themed pie / donut chart that mirrors the shadcn <PieChart> component.
Parameters
donut
When true, cuts out an inner circle to produce a donut (chart-pie-donut / chart-pie-donut-text).
centerLabel
Text rendered in the donut hole (chart-pie-donut-text). Ignored when donut is false.
activeSegment
Index of the segment to expand outward slightly (chart-pie-donut-active / chart-pie-interactive). -1 means no active segment.
showLabels
Draws a line + percentage label at each segment (chart-pie-label / chart-pie-label-custom).
separatorStroke
Stroke width of the gap between segments in dp. Pass 0.dp for chart-pie-separator-none.