PieChart

fun PieChart(data: () -> List<PieChartData>, modifier: Modifier = Modifier, isDonutChart: Boolean = false, onPieChartSliceClick: (PieChartData) -> Unit = {})

Composable function to draw a Pie Chart.

Parameters

data

Lambda function that returns a list of PieChartData representing the slices of the pie chart.

modifier

Modifier to be applied to the Canvas.

isDonutChart

Boolean indicating if the chart should be a donut chart.

onPieChartSliceClick

Lambda function to be called when a slice of the pie chart is clicked.