ItemPlacer

interface ItemPlacer

Determines for what y values a VerticalAxis displays labels, ticks, and guidelines.

Types

Link copied to clipboard
object Companion

Houses ItemPlacer factory functions.

Functions

Link copied to clipboard
abstract fun getBottomVerticalAxisInset(context: CartesianMeasuringContext, verticalLabelPosition: VerticalAxis.VerticalLabelPosition, maxLabelHeight: Float, maxLineThickness: Float): Float

Returns the bottom inset required by the VerticalAxis.

Link copied to clipboard

Returns, as a list, the y values for which the VerticalAxis is to create labels and measure their heights during the measuring phase. The height of the tallest label is passed to other functions.

Link copied to clipboard
abstract fun getLabelValues(context: CartesianDrawingContext, axisHeight: Float, maxLabelHeight: Float, position: Axis.Position.Vertical): List<Double>

Returns, as a list, the y values for which labels are to be displayed.

Link copied to clipboard
open fun getLineValues(context: CartesianDrawingContext, axisHeight: Float, maxLabelHeight: Float, position: Axis.Position.Vertical): List<Double>?

Returns, as a list, the y values for which ticks and guidelines are to be displayed.

Link copied to clipboard

Returns a boolean indicating whether to shift the lines whose y values are equal to CartesianChartRanges.YRange.maxY, if such lines are present, such that they’re immediately above the CartesianLayer bounds. If a top HorizontalAxis is present, the shifted tick will then be aligned with the axis line, and the shifted guideline will be hidden.

Link copied to clipboard
abstract fun getTopVerticalAxisInset(context: CartesianMeasuringContext, verticalLabelPosition: VerticalAxis.VerticalLabelPosition, maxLabelHeight: Float, maxLineThickness: Float): Float

Returns the top inset required by the VerticalAxis.

Link copied to clipboard
abstract fun getWidthMeasurementLabelValues(context: CartesianMeasuringContext, axisHeight: Float, maxLabelHeight: Float, position: Axis.Position.Vertical): List<Double>

Returns, as a list, the y values for which the VerticalAxis is to create labels and measure their widths during the measuring phase. This affects how much horizontal space the VerticalAxis requests.