VerticalLegend

open class VerticalLegend(var items: Collection<LegendItem>, var iconSizeDp: Float, var iconPaddingDp: Float, var spacingDp: Float = 0.0f, val padding: MutableDimensions = emptyDimensions()) : Legend, Padding

VerticalLegend displays legend items in a vertical list.

Parameters

items

a Collection of LegendItems to be displayed by this VerticalLegend.

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: Collection<LegendItem>, iconSizeDp: Float, iconPaddingDp: Float, spacingDp: Float = 0.0f, padding: MutableDimensions = emptyDimensions())

Types

Link copied to clipboard
class Item(val icon: Component, val label: TextComponent, val labelText: CharSequence) : LegendItem

Defines the appearance of an item of a VerticalLegend.

Properties

Link copied to clipboard
open override val bounds: RectF

The bounds of the abstract component.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val padding: MutableDimensions
Link copied to clipboard

Functions

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

Draws the legend.

Link copied to clipboard
open override fun getHeight(context: MeasureContext, availableWidth: Float): Float

Returns the height of the legend.