BarChartSegment

data class BarChartSegment(val value: Float, val color: Color)

A single segment within a stacked bar, representing one sub-category's contribution to the bar's total height.

Segments are drawn bottom-to-top in list order. Only the topmost non-zero segment receives rounded top corners; all others are drawn as plain rectangles so the stack appears seamless.

See also

Constructors

Link copied to clipboard
constructor(value: Float, color: Color)

Properties

Link copied to clipboard

Fill color for this segment's rectangle. Typically obtained from stylishChartColor for palette consistency.

Link copied to clipboard

Numeric magnitude of this segment. Its rendered height is proportional to value / chartMaxValue. Negative or non-finite values (NaN, ±Infinity) are treated as zero and render no height.