Companion

object Companion

Houses ItemPlacer factory functions.

Functions

Link copied to clipboard
fun count(count: (ExtraStore) -> Int? = { null }, shiftTopLines: Boolean = true): VerticalAxis.ItemPlacer

Creates a count-based ItemPlacer implementation. count returns the number of labels (and their corresponding line pairs) to be displayed. This may be reduced for overlap prevention. If null is returned, the VerticalAxis will display as many items as possible. shiftTopLines is used as the return value of ItemPlacer.getShiftTopLines.

Link copied to clipboard
fun step(step: (ExtraStore) -> Double? = { null }, shiftTopLines: Boolean = true): VerticalAxis.ItemPlacer

Creates a step-based ItemPlacer implementation. step returns the difference between the y values of neighboring labels (and their corresponding line pairs). A multiple of this may be used for overlap prevention. If null is returned, the step will be determined automatically. shiftTopLines is used as the return value of ItemPlacer.getShiftTopLines.