Package-level declarations

Types

Link copied to clipboard
@Preview(name = "Light", group = "Theme", uiMode = 17)
@Preview(name = "Dark", group = "Theme", uiMode = 33)
annotation class ChartsPreviewLightDark

Functions

Link copied to clipboard
fun BarChart(data: ChartData, modifier: Modifier = Modifier, style: BarChartStyle = BarChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true, valueFormatter: ChartValueFormatter = BarChartDefaults.valueFormatter, axisValueFormatter: ChartValueFormatter = BarChartDefaults.axisValueFormatter)

Displays one indexed series of finite Double values as vertical bars.

Link copied to clipboard
Link copied to clipboard
fun HistogramChart(data: ChartData, modifier: Modifier = Modifier, style: HistogramChartStyle = HistogramChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true, valueFormatter: ChartValueFormatter = BarChartDefaults.valueFormatter, axisValueFormatter: ChartValueFormatter = BarChartDefaults.axisValueFormatter)

Displays one series of precomputed, finite, nonnegative bin heights at equal visual widths. Fractional heights and arbitrary category labels (including open-ended intervals) are supported. Fit mode preserves every bin, even at subpixel widths; it never averages or merges bins. Expanded mode provides minimum-width scrolling. Defaults use adjacent bins and a zero baseline.

Link copied to clipboard
fun LineChart(data: ChartData, modifier: Modifier = Modifier, style: LineChartStyle = LineChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true, renderMode: LineChartRenderMode = LineChartRenderMode.Morph, animationDuration: Duration = 420.milliseconds, valueFormatter: ChartValueFormatter = LineChartDefaults.valueFormatter, axisValueFormatter: ChartValueFormatter = LineChartDefaults.axisValueFormatter)

Displays one or more aligned indexed series. A single public entry point handles both single- and multi-line data. Selection always refers to a source X index shared by all series. In compact mode, user interaction selects the middle source index represented by a bucket; programmatic source selection highlights the bucket containing that index.

Link copied to clipboard
fun PieChart(data: List<PieSlice>, modifier: Modifier = Modifier, style: PieChartStyle = PieChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true)

A composable function that displays a Pie Chart.

Link copied to clipboard
fun RadarChart(data: ChartData, modifier: Modifier = Modifier, style: RadarChartStyle = RadarChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true)

Displays one or more radar polygons sharing common axes.

Link copied to clipboard
fun StackedAreaChart(data: ChartData, modifier: Modifier = Modifier, style: StackedAreaChartStyle = StackedAreaChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true)

Displays absolute stacked areas from one or more aligned series sharing common X categories.

Link copied to clipboard
fun StackedBarChart(data: ChartData, modifier: Modifier = Modifier, style: StackedBarChartStyle = StackedBarChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true)

Displays nonnegative absolute stacks from one aligned series per segment.