getLabelWidth

fun getLabelWidth(context: MeasuringContext, iconSizeDp: Float, iconLabelSpacingDp: Float, maxWidth: Float): Float

Measures the width of the label.

Parameters

iconSizeDp

the LegendItem.icon size (in dp).

iconLabelSpacingDp

the spacing between LegendItem.icon and LegendItem.labelComponent (in dp).

maxWidth

the maximum LegendItem width.