VerticalLegend

open class VerticalLegend<M : MeasuringContext, D : DrawingContext>(items: AdditionScope<LegendItem>.(ExtraStore) -> Unit, iconSizeDp: Float, iconPaddingDp: Float, spacingDp: Float = 0.0f, padding: Dimensions = Dimensions.Empty) : Legend<M, D>

VerticalLegend displays legend items in a vertical list.

Parameters

items

adds the LegendItems.

iconSizeDp

defines the size of all LegendItem.icons.

iconPaddingDp

defines the padding between each LegendItem.icon and its corresponding LegendItem.label.

spacingDp

defines the vertical spacing between each LegendItem.

padding

defines the padding of the content.

Constructors

Link copied to clipboard
constructor(items: AdditionScope<LegendItem>.(ExtraStore) -> Unit, iconSizeDp: Float, iconPaddingDp: Float, spacingDp: Float = 0.0f, padding: Dimensions = Dimensions.Empty)

Properties

Link copied to clipboard
open override val bounds: RectF

The bounds of the abstract component.

Functions

Link copied to clipboard
open override fun draw(context: D)

Draws the legend.

Link copied to clipboard
open override fun getHeight(context: M, maxWidth: Float): Float

Returns the height of the legend.