PieChartHost
PieChartHost is the entry point for pie charts. It accepts PieChart and PieChartModelProducer instances, facilitates communication between them, and displays the chart. It also shows a placeholder when no data is available.
PieChartHost(rememberPieChart(/* ... */), modelProducer, /* ... */)You can also use a manually created PieChartModel instance instead of a model producer:
PieChartHost(rememberPieChart(/* ... */), model, /* ... */)Sizing
The chartAreaHeight parameter sets the default pie diameter. Its default value is 232 dp. Legends, outside labels, and other components add to this height instead of being fitted inside it.
This default applies only when the host’s height isn’t otherwise constrained. Modifier.height and similar modifiers set the total host height, within which the pie and its components are fitted.
Last updated