PieChartImage

fun PieChartImage(chart: ERROR CLASS: Symbol not found for PieChart, model: ERROR CLASS: Symbol not found for PieChartModel, contentDescription: String?, modifier: ERROR CLASS: Symbol not found for GlanceModifier = GlanceModifier, size: ERROR CLASS: Symbol not found for DpSize = LocalSize.current, contentScale: ERROR CLASS: Symbol not found for ContentScale = ContentScale.Fit)

Displays a PieChart as a static image in a Glance app widget.

The chart is rendered off-screen to a bitmap and displayed via Glance’s Image. Since Glance doesn’t support Compose Canvas, this is the recommended approach for showing charts in widgets.

Parameters

chart

the PieChart.

model

the PieChartModel.

contentDescription

the content description for accessibility.

modifier

the GlanceModifier to be applied.

size

the desired chart size. Defaults to the widget size provided by Glance’s LocalSize.

contentScale

how the chart image should be scaled within its bounds.