Horizontal

An AxisItemPlacer subinterface for HorizontalAxis instances.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns a boolean indicating whether the HorizontalAxis should reserve room for a label for ChartValues.minX. If true is returned, indicating that this behavior is desired, then getLabelValues should request a label for ChartValues.minX.

Link copied to clipboard

Returns a boolean indicating whether the HorizontalAxis should reserve room for a label for ChartValues.maxX. If true is returned, indicating that this behavior is desired, then getLabelValues should request a label for ChartValues.maxX.

Link copied to clipboard
abstract fun getEndHorizontalAxisInset(context: MeasureContext, horizontalDimensions: HorizontalDimensions, tickThickness: Float): Float

Returns the end inset required by the HorizontalAxis.

Link copied to clipboard

Returns, as a list, the x values for which labels are to be displayed, restricted to visibleXRange and with two extra values on either side (if applicable).

Link copied to clipboard

Returns, as a list, the x values for which ticks and guidelines are to be displayed, restricted to visibleXRange and with an extra value on either side (if applicable). If null is returned, the values returned by getLabelValues are used.

Link copied to clipboard
open fun getMeasuredLabelClearance(context: MeasureContext, horizontalDimensions: HorizontalDimensions, fullXRange: ClosedFloatingPointRange<Float>): Float

Returns the smallest expected distance between a label measured during the measuring phase and the next label or the previous label, whichever is closer to the measured label. This distance is expressed as the difference between the two labels’ x values divided by ChartValues.xStep.

Link copied to clipboard
abstract fun getMeasuredLabelValues(context: MeasureContext, horizontalDimensions: HorizontalDimensions, fullXRange: ClosedFloatingPointRange<Float>): List<Float>

Returns, as a list, the x values for which labels are to be created and measured during the measuring phase. This affects how much vertical space the HorizontalAxis requests.

Link copied to clipboard

Whether ticks whose x values are bounds of the x-axis value range should be shifted to the edges of the axis bounds, to be aligned with the vertical axes.

Link copied to clipboard
abstract fun getStartHorizontalAxisInset(context: MeasureContext, horizontalDimensions: HorizontalDimensions, tickThickness: Float): Float

Returns the start inset required by the HorizontalAxis.