Bar Legend
data class BarLegend<UnitType : Dimension>(val id: String, var items: List<BarLegendItem<UnitType>> = emptyList(), val resample: EasingCurve? = null, var title: String? = null, var titleFontSize: TextUnit = LegendDefaults.titleFontSize, val titleFontWeight: FontWeight = FontWeight.Bold, var titleColorValue: Color = LegendDefaults().titleColor, val labelFontSize: TextUnit = BarLegendDefaults.labelFontSize, var labelColor: Color = BarLegendDefaults.labelColor, val labelFont: Typeface = BarLegendDefaults.labelFont, val measurement: MeasurementUnits.MeasurementType? = null, val units: MeasurementUnits = MeasurementUnits.IMPERIAL, var currentUnits: UnitType? = units.dimensions(measurement)) : Legend, ColorScaleUpdatable
A Legend type that renders a color bar with optional measurement-aware labels. It's a data class to promote immutability, common in Compose.
Parameters
Unit Type
A type representing the unit of measurement (e.g., Temperature, Speed).
Constructors
Link copied to clipboard
constructor(id: String, items: List<BarLegendItem<UnitType>> = emptyList(), resample: EasingCurve? = null, title: String? = null, titleFontSize: TextUnit = LegendDefaults.titleFontSize, titleFontWeight: FontWeight = FontWeight.Bold, titleColorValue: Color = LegendDefaults().titleColor, labelFontSize: TextUnit = BarLegendDefaults.labelFontSize, labelColor: Color = BarLegendDefaults.labelColor, labelFont: Typeface = BarLegendDefaults.labelFont, measurement: MeasurementUnits.MeasurementType? = null, units: MeasurementUnits = MeasurementUnits.IMPERIAL, currentUnits: UnitType? = units.dimensions(measurement))
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The size of the Title Text
Link copied to clipboard
Link copied to clipboard
Units used when formatting any measurement values displayed by the legend.
Functions
Link copied to clipboard
Applies the provided color-scale specification to the implementing legend.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Allows an implementing class to create a new version of itself with updated units.
Link copied to clipboard