LineVisualStyle

data class LineVisualStyle(val color: Color, val alpha: Float, val colors: ImmutableList<Color>, val strokeWidth: Dp, val bezier: Boolean, val gradient: ChartGradient?)(source)

Style of the series lines.

Constructors

Link copied to clipboard
constructor(color: Color, alpha: Float, colors: ImmutableList<Color>, strokeWidth: Dp, bezier: Boolean, gradient: ChartGradient?)
constructor(color: Color, alpha: Float, colors: List<Color>, strokeWidth: Dp, bezier: Boolean, gradient: ChartGradient? = null)

Copies the supplied list into an immutable list.

Properties

Link copied to clipboard

The line alpha. Replaces the line colors' alpha, and multiplies a gradient's own alphas.

Link copied to clipboard

Whether points are joined by smooth curves rather than straight segments.

Link copied to clipboard

Color used for a single series and to generate a multi-series palette.

Link copied to clipboard
val colors: ImmutableList<Color>

Optional multi-series palette. When set, its count must match the series count. A single series uses color, even when a one-color palette is supplied.

Link copied to clipboard

Shared gradient that paints every line. Its span picks one gradient per line or one across the plot. null draws solid lines.

Link copied to clipboard

Line stroke width in density-independent pixels.

Functions

Link copied to clipboard
fun resolveColors(seriesCount: Int): ImmutableList<Color>

Returns the line colors the chart draws for seriesCount series, before alpha is applied.