style

fun style(pointColor: Color = defaultPointColor(), pointSize: Float = 9.0f, pointVisible: Boolean = false, lineColor: Color = MaterialTheme.colorScheme.primary, lineAlpha: Float = defaultChartAlpha(), lineColors: List<Color> = emptyList(), bezier: Boolean = true, dragPointSize: Float = 7.0f, dragPointVisible: Boolean = true, dragActivePointSize: Float = 12.0f, dragPointColor: Color = defaultDragPointColor(), axisVisible: Boolean = true, axisColor: Color = defaultAxisColor(), axisLineWidth: Float = 1.0f, yAxisLabelsVisible: Boolean = true, yAxisLabelColor: Color = defaultYAxisLabelColor(), yAxisLabelSize: TextUnit = 11.sp, yAxisLabelCount: Int = 5, xAxisLabelsVisible: Boolean = true, xAxisLabelColor: Color = defaultXAxisLabelColor(), xAxisLabelSize: TextUnit = 11.sp, xAxisLabelMaxCount: Int = 6, zoomControlsVisible: Boolean = true, chartViewStyle: ChartViewStyle = ChartViewDefaults.style()): LineChartStyle

Returns a LineChartStyle with the provided parameters or their default values.

Parameters

pointColor

The color of the points on the line chart. Defaults to the tertiary color of the MaterialTheme.

pointSize

The size of the points on the line chart. Defaults to 9f.

pointVisible

A boolean indicating whether the points on the line chart are visible. Defaults to false.

lineColor

The color of the line in the line chart. Defaults to the primary color of the MaterialTheme.

lineAlpha

The alpha value applied to rendered line colors. Defaults to 0.4f in light theme and 0.6f in dark theme.

lineColors

The colors of the lines in the line chart. Defaults to an empty list.

bezier

A boolean indicating whether the line chart should be drawn with bezier curves. Defaults to true.

dragPointSize

The size of the drag point on the line chart. Defaults to 7f.

dragPointVisible

A boolean indicating whether the drag point on the line chart is visible. Defaults to true.

dragActivePointSize

The size of the active drag point on the line chart. Defaults to 12f.

dragPointColor

The color of the drag point on the line chart. Defaults to the tertiary color of the MaterialTheme.

axisVisible

Whether chart axes are shown. Defaults to true.

axisColor

The color of the axes. Defaults to a theme-based onSurface variant.

axisLineWidth

The stroke width of the axes. Defaults to 1f.

yAxisLabelsVisible

Whether Y-axis labels are shown. Defaults to true.

yAxisLabelColor

The color of Y-axis labels. Defaults to a theme-based onSurface variant.

yAxisLabelSize

The text size of Y-axis labels. Defaults to 11.sp.

yAxisLabelCount

Number of Y-axis labels. Defaults to 5.

xAxisLabelsVisible

Whether X-axis labels are shown. Defaults to true.

xAxisLabelColor

The color of X-axis labels. Defaults to a theme-based onSurface variant.

xAxisLabelSize

The text size of X-axis labels. Defaults to 11.sp.

xAxisLabelMaxCount

Maximum number of X-axis labels to display. Defaults to 6.

zoomControlsVisible

Whether dense-mode zoom controls are shown. Defaults to true.

chartViewStyle

The style to be applied to the chart view. Defaults to the default style of ChartViewDefaults.

Dense zoom/scroll properties are applied in morph mode and ignored in timeline mode.