LineChart

fun LineChart(data: () -> List<LineData>, modifier: Modifier = Modifier, smoothLineCurve: Boolean = true, showFilledArea: Boolean = false, showLineStroke: Boolean = true, colorConfig: LineChartColorConfig = LineChartColorConfig.default(), labelConfig: LabelConfig = LabelConfig.default(), target: Float? = null, targetConfig: TargetConfig = TargetConfig.default(), chartConfig: LineChartConfig = LineChartConfig(), onClick: (LineData) -> Unit = {})

A composable function that renders a line chart.

Parameters

data

A lambda function that returns a list of LineData representing the data points for the line chart.

modifier

A Modifier for customizing the layout or drawing behavior of the chart.

smoothLineCurve

A boolean indicating whether the line should be drawn with smooth curves.

showFilledArea

A boolean indicating whether the area under the line should be filled.

showLineStroke

A boolean indicating whether the line should be stroked.

colorConfig

A LineChartColorConfig object for configuring the colors of the line and filled area.

labelConfig

A LabelConfig object for configuring the labels on the chart.

chartConfig

A LineChartConfig object for configuring the chart's appearance and behavior.

Throws

if both showFilledArea and showLineStroke are false.