Line Chart
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.
smooth Line Curve
A boolean indicating whether the line should be drawn with smooth curves.
show Filled Area
A boolean indicating whether the area under the line should be filled.
show Line Stroke
A boolean indicating whether the line should be stroked.
color Config
A LineChartColorConfig
object for configuring the colors of the line and filled area.
label Config
A LabelConfig
object for configuring the labels on the chart.
chart Config
A LineChartConfig
object for configuring the chart's appearance and behavior.
Throws
if both showFilledArea
and showLineStroke
are false.