LineChartDefaults

Theme-aware style factories and default value formatters for LineChartStyle.

Properties

Link copied to clipboard

Default axis formatter, omitting only the terminal .0 on whole values.

Link copied to clipboard

Default formatter for selected values in the title and legend.

Functions

Link copied to clipboard
fun legend(visible: Boolean = StyleDefaults.legendVisible): LegendStyle

Returns a LegendStyle with the provided visibility.

Link copied to clipboard
fun line(color: Color = StyleDefaults.seriesColor, alpha: Float = StyleDefaults.seriesAlpha, colors: List<Color> = emptyList(), strokeWidth: Dp = StyleDefaults.seriesLineWidth, bezier: Boolean = true, gradient: ChartGradient? = null): LineVisualStyle

Returns a LineVisualStyle for the series lines.

Link copied to clipboard
fun points(color: Color = StyleDefaults.pointColor, size: Dp = StyleDefaults.pointSize, visible: Boolean = StyleDefaults.pointsVisible): LinePointStyle

Returns a LinePointStyle for the data point markers.

Link copied to clipboard
fun range(min: Double? = null, max: Double? = null): LineRangeStyle

Returns a LineRangeStyle for the optional fixed Y-axis range.

Link copied to clipboard
fun selection(visible: Boolean = true, color: Color = StyleDefaults.selectionColor, width: Dp = StyleDefaults.lineWidth, markerColor: Color = StyleDefaults.pointColor, markerSize: Dp = StyleDefaults.lineSelectionMarkerSize, pointSize: Dp = StyleDefaults.selectedPointSize): LineSelectionStyle

Returns a LineSelectionStyle for the selection line and markers.

Link copied to clipboard
fun style(chartContainerStyle: ChartContainerStyle = ChartContainerDefaults.style(), line: LineVisualStyle = line(), points: LinePointStyle = points(), selection: LineSelectionStyle = selection(), axes: AxesStyle = AxesDefaults.style(), range: LineRangeStyle = range(), legend: LegendStyle = legend(), zoomControlsVisible: Boolean = true): LineChartStyle

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

Link copied to clipboard
fun xLabels(visible: Boolean = StyleDefaults.axisLabelsVisible, color: Color = StyleDefaults.axisLabelColor, size: TextUnit = StyleDefaults.axisLabelSize, maxCount: Int? = StyleDefaults.axisLabelMaxCount): AxisLabelStyle

Returns an AxisLabelStyle for X-axis labels.

Link copied to clipboard
fun yLabels(visible: Boolean = StyleDefaults.axisLabelsVisible, color: Color = StyleDefaults.axisLabelColor, size: TextUnit = StyleDefaults.axisLabelSize, maxCount: Int? = StyleDefaults.axisLabelMaxCount): AxisLabelStyle

Returns an AxisLabelStyle for Y-axis labels.