SizeConstraint

sealed class SizeConstraint

Determines how a BaseAxis sizes itself.

Inheritors

Types

Link copied to clipboard
class Auto(val minSizeDp: Float = 0.0f, val maxSizeDp: Float = Float.MAX_VALUE) : BaseAxis.SizeConstraint

The axis will measure itself and use as much space as it needs, but no less than minSizeDp, and no more than maxSizeDp.

Link copied to clipboard
class Exact(val sizeDp: Float) : BaseAxis.SizeConstraint

The axis size will be exactly sizeDp.

Link copied to clipboard
class Fraction(val fraction: Float) : BaseAxis.SizeConstraint

The axis will use a fraction of the available space.

Link copied to clipboard

The axis will measure the width of its label component (label) for the given String (text), and it will use this width as its size. In the case of VerticalAxis, the width of the axis line and the tick length will also be considered.