PieChartHost

fun PieChartHost(chart: PieChart, modelProducer: PieChartModelProducer, modifier: Modifier = Modifier, animationSpec: AnimationSpec<Float>? = defaultPieDiffAnimationSpec, animateIn: Boolean = true, chartAreaHeight: Dp = Defaults.PIE_CHART_AREA_HEIGHT.dp, placeholder: @Composable BoxScope.() -> Unit = {})

Displays a PieChart.

Parameters

chart
modelProducer

creates and updates the PieChartModel.

modifier

the modifier to be applied to the chart.

animationSpec

the AnimationSpec for difference animations.

animateIn

whether to run an initial animation when the PieChartHost enters composition. The animation is skipped for previews.

chartAreaHeight

the default diameter of the pie, to which the heights of the legend and other components are added. Used only when the height isn’t otherwise constrained (e.g., via Modifier.height).

placeholder

shown when no PieChartModel is available.


fun PieChartHost(chart: PieChart, model: PieChartModel, modifier: Modifier = Modifier, chartAreaHeight: Dp = Defaults.PIE_CHART_AREA_HEIGHT.dp)

Displays a PieChart.

Parameters

chart
model
modifier

the modifier to be applied to the chart.

chartAreaHeight

the default diameter of the pie, to which the heights of the legend and other components are added. Used only when the height isn’t otherwise constrained (e.g., via Modifier.height).