Legend

interface Legend

Describes the data and view-building hooks required for a legend. This is designed to be implemented by a data-holding class, often a data class, which can then be rendered by a Composable function.

Inheritors

Properties

Link copied to clipboard
abstract val id: String

Unique identifier used to register and manage the legend instance.

Link copied to clipboard
abstract var title: String?

Display title rendered above the legend content.

Link copied to clipboard
abstract var titleColorValue: Color
Link copied to clipboard
abstract var titleFontSize: TextUnit

The size of the Title Text

Link copied to clipboard
abstract val units: MeasurementUnits

Units used when formatting any measurement values displayed by the legend.

Functions

Link copied to clipboard
abstract fun items(newItems: List<PointLegendItem>): PointLegend
abstract fun items(newItems: List<BarLegendItem<Dimension>>): BarLegend<*>
Link copied to clipboard
abstract fun title(newValue: String?): Legend

Allows an implementing class to create a new version of itself with an updated title.

Link copied to clipboard
open fun titleColor(color: Color): Legend
Link copied to clipboard
abstract fun units(newValue: MeasurementUnits): Legend

Allows an implementing class to create a new version of itself with updated units.

Link copied to clipboard
abstract fun updateFromPaint(paint: LayerPaint): Legend