-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.axis.AxisItemPlacer
public interface AxisItemPlacer.Horizontal implements AxisItemPlacer
An AxisItemPlacer subinterface for HorizontalAxis instances.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAxisItemPlacer.Horizontal.Companion
-
Method Summary
Modifier and Type Method Description abstract List<Float>getLabelValues(ChartDrawContext context, ClosedFloatingPointRange<Float> visibleXRange, ClosedFloatingPointRange<Float> fullXRange)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). abstract List<Float>getMeasuredLabelValues(MeasureContext context, HorizontalDimensions horizontalDimensions, ClosedFloatingPointRange<Float> fullXRange)Returns, as a list, the x values for which labels are to be created and measured during the measuring phase. abstract FloatgetMeasuredLabelClearance(MeasureContext context, HorizontalDimensions horizontalDimensions, ClosedFloatingPointRange<Float> fullXRange)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. abstract List<Float>getLineValues(ChartDrawContext context, ClosedFloatingPointRange<Float> visibleXRange, ClosedFloatingPointRange<Float> fullXRange)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). abstract FloatgetStartHorizontalAxisInset(MeasureContext context, HorizontalDimensions horizontalDimensions, Float tickThickness)Returns the start inset required by the HorizontalAxis. abstract FloatgetEndHorizontalAxisInset(MeasureContext context, HorizontalDimensions horizontalDimensions, Float tickThickness)Returns the end inset required by the HorizontalAxis. -
-
Method Detail
-
getLabelValues
abstract List<Float> getLabelValues(ChartDrawContext context, ClosedFloatingPointRange<Float> visibleXRange, ClosedFloatingPointRange<Float> fullXRange)
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).
-
getMeasuredLabelValues
abstract List<Float> getMeasuredLabelValues(MeasureContext context, HorizontalDimensions horizontalDimensions, ClosedFloatingPointRange<Float> fullXRange)
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.
-
getMeasuredLabelClearance
abstract Float getMeasuredLabelClearance(MeasureContext context, HorizontalDimensions horizontalDimensions, ClosedFloatingPointRange<Float> fullXRange)
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.
-
getLineValues
abstract List<Float> getLineValues(ChartDrawContext context, ClosedFloatingPointRange<Float> visibleXRange, ClosedFloatingPointRange<Float> fullXRange)
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
nullis returned, the values returned by getLabelValues are used.
-
getStartHorizontalAxisInset
abstract Float getStartHorizontalAxisInset(MeasureContext context, HorizontalDimensions horizontalDimensions, Float tickThickness)
Returns the start inset required by the HorizontalAxis.
-
getEndHorizontalAxisInset
abstract Float getEndHorizontalAxisInset(MeasureContext context, HorizontalDimensions horizontalDimensions, Float tickThickness)
Returns the end inset required by the HorizontalAxis.
-
-
-
-