CartesianChartImage
fun CartesianChartImage(chart: ERROR CLASS: Symbol not found for CartesianChart, model: ERROR CLASS: Symbol not found for CartesianChartModel, 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 CartesianChart 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 CartesianChart.
model
the CartesianChartModel.
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.