PieChart
PieChart draws a pie chart.
Creation
Instantiate PieChart via rememberPieChart.
val chart = rememberPieChart(/* ... */)PieChart accepts a SliceProvider instance, which supplies Slice instances for successive entries. Use SliceProvider.series for the standard repeating-series setup.
Each pie-slice style can define fill, stroke, an offset from the center, and an optional SliceLabel. There are two built-in label types:
Use PieValueFormatter to format slice labels.
You can also customize slice spacing, the start angle, and the inner and outer sizes. A nonzero inner size produces a donut chart.
The chart host reserves vertical space for outside labels, so they don’t reduce the pie diameter or get clipped. For an example that combines outside labels, slice spacing, and a nonzero inner size, see the “Basic donut chart” sample chart.
For an example, see the “Basic pie chart” sample chart.

Last updated