StackedBarSegmentStyle

data class StackedBarSegmentStyle(val color: Color, val colors: ImmutableList<Color>, val alpha: Float, val gradient: ChartGradient?)(source)

Colors and fills for stacked bar segments.

Constructors

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

Copies the supplied list into an immutable list.

Properties

Link copied to clipboard

Segment alpha in 0..1. Replaces solid color alpha and multiplies gradient alphas.

Link copied to clipboard

Base color for the generated series palette.

Link copied to clipboard
val colors: ImmutableList<Color>

Optional palette in series order; empty generates shades of color. When set, its count must match the series count.

Link copied to clipboard

Optional gradient per shape or across the plot. Null draws solid segments.

Functions

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

Returns the segment colors the chart draws for seriesCount series, before alpha is applied: colors when set, or generated shades of color when colors is empty.