-
public final class HorizontalAxisKt
-
-
Method Summary
Modifier and Type Method Description final static HorizontalAxis<AxisPosition.Horizontal.Top>rememberTopAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, AxisItemPlacer.Horizontal itemPlacer)Creates and remembers a top axis (i.e. final static HorizontalAxis<AxisPosition.Horizontal.Bottom>rememberBottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, AxisItemPlacer.Horizontal itemPlacer)Creates and remembers a bottom axis (i.e. final static HorizontalAxis<AxisPosition.Horizontal.Top>topAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, AxisItemPlacer.Horizontal itemPlacer)Creates and remembers a top axis (i.e. final static HorizontalAxis<AxisPosition.Horizontal.Top>topAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, Integer labelSpacing, Integer labelOffset)Creates and remembers a top axis (i.e. final static HorizontalAxis<AxisPosition.Horizontal.Bottom>bottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, AxisItemPlacer.Horizontal itemPlacer)Creates and remembers a bottom axis (i.e. final static HorizontalAxis<AxisPosition.Horizontal.Bottom>bottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, Integer labelSpacing, Integer labelOffset)Creates and remembers a bottom axis (i.e. -
-
Method Detail
-
rememberTopAxis
@Composable() final static HorizontalAxis<AxisPosition.Horizontal.Top> rememberTopAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, AxisItemPlacer.Horizontal itemPlacer)
Creates and remembers a top axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Top).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.labelRotationDegrees- the rotation of the axis labels (in degrees).titleComponent- an optional TextComponent to use as the axis title.title- the axis title.itemPlacer- determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
rememberBottomAxis
@Composable() final static HorizontalAxis<AxisPosition.Horizontal.Bottom> rememberBottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, AxisItemPlacer.Horizontal itemPlacer)
Creates and remembers a bottom axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Bottom).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.titleComponent- an optional TextComponent to use as the axis title.title- the axis title.labelRotationDegrees- the rotation of the axis labels (in degrees).itemPlacer- determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
topAxis
@Composable()@Deprecated(message = Use `rememberTopAxis` instead., replaceWith = @ReplaceWith(imports = {com.patrykandpatrick.vico.compose.axis.horizontal.rememberTopAxis}, expression = rememberTopAxis( label = label, axis = axis, tick = tick, tickLength = tickLength, guideline = guideline, valueFormatter = valueFormatter, sizeConstraint = sizeConstraint, labelRotationDegrees = labelRotationDegrees, titleComponent = titleComponent, title = title, itemPlacer = itemPlacer, ) )) final static HorizontalAxis<AxisPosition.Horizontal.Top> topAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, AxisItemPlacer.Horizontal itemPlacer)
Creates and remembers a top axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Top).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.labelRotationDegrees- the rotation of the axis labels (in degrees).titleComponent- an optional TextComponent to use as the axis title.title- the axis title.itemPlacer- determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
topAxis
@Composable()@Deprecated(message = `topAxis` is being replaced by `rememberTopAxis`. Also, `labelSpacing` and `labelOffset` are being replaced by `AxisItemPlacer.Horizontal`. Create a base `AxisItemPlacer.Horizontal` implementation with the desired spacing and offset via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` parameter of `rememberTopAxis` to apply it to the `HorizontalAxis` being created. , replaceWith = @ReplaceWith(imports = {androidx.compose.runtime.remember, com.patrykandpatrick.vico.compose.axis.horizontal.rememberTopAxis, com.patrykandpatrick.vico.core.axis.AxisItemPlacer}, expression = rememberTopAxis( label = label, axis = axis, tick = tick, tickLength = tickLength, guideline = guideline, valueFormatter = valueFormatter, sizeConstraint = sizeConstraint, labelRotationDegrees = labelRotationDegrees, titleComponent = titleComponent, title = title, itemPlacer = remember { AxisItemPlacer.Horizontal.default(spacing = labelSpacing, offset = labelOffset) }, ) )) final static HorizontalAxis<AxisPosition.Horizontal.Top> topAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Top> valueFormatter, Axis.SizeConstraint sizeConstraint, Float labelRotationDegrees, TextComponent titleComponent, CharSequence title, Integer labelSpacing, Integer labelOffset)
Creates and remembers a top axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Top).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.labelRotationDegrees- the rotation of the axis labels (in degrees).titleComponent- an optional TextComponent to use as the axis title.title- the axis title.labelSpacing- how often labels (and their corresponding ticks and guidelines) should be drawn.labelOffset- the number of labels (and, for HorizontalLayout.FullWidth, their corresponding ticks and guidelines) to skip from the start.
-
bottomAxis
@Composable()@Deprecated(message = Use `rememberBottomAxis` instead., replaceWith = @ReplaceWith(imports = {com.patrykandpatrick.vico.compose.axis.horizontal.rememberBottomAxis}, expression = rememberBottomAxis( label = label, axis = axis, tick = tick, tickLength = tickLength, guideline = guideline, valueFormatter = valueFormatter, sizeConstraint = sizeConstraint, titleComponent = titleComponent, title = title, labelRotationDegrees = labelRotationDegrees, itemPlacer = itemPlacer, ) )) final static HorizontalAxis<AxisPosition.Horizontal.Bottom> bottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, AxisItemPlacer.Horizontal itemPlacer)
Creates and remembers a bottom axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Bottom).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.titleComponent- an optional TextComponent to use as the axis title.title- the axis title.labelRotationDegrees- the rotation of the axis labels (in degrees).itemPlacer- determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
bottomAxis
@Composable()@Deprecated(message = `bottomAxis` is being replaced by `rememberBottomAxis`. Also, `labelSpacing` and `labelOffset` are being replaced by `AxisItemPlacer.Horizontal`. Create a base `AxisItemPlacer.Horizontal` implementation with the desired spacing and offset via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` parameter of `rememberBottomAxis` to apply it to the `HorizontalAxis` being created. , replaceWith = @ReplaceWith(imports = {androidx.compose.runtime.remember, com.patrykandpatrick.vico.compose.axis.horizontal.rememberBottomAxis, com.patrykandpatrick.vico.core.axis.AxisItemPlacer}, expression = rememberBottomAxis( label = label, axis = axis, tick = tick, tickLength = tickLength, guideline = guideline, valueFormatter = valueFormatter, sizeConstraint = sizeConstraint, titleComponent = titleComponent, title = title, labelRotationDegrees = labelRotationDegrees, itemPlacer = remember { AxisItemPlacer.Horizontal.default(spacing = labelSpacing, offset = labelOffset) }, ) )) final static HorizontalAxis<AxisPosition.Horizontal.Bottom> bottomAxis(TextComponent label, LineComponent axis, LineComponent tick, Dp tickLength, LineComponent guideline, AxisValueFormatter<AxisPosition.Horizontal.Bottom> valueFormatter, Axis.SizeConstraint sizeConstraint, TextComponent titleComponent, CharSequence title, Float labelRotationDegrees, Integer labelSpacing, Integer labelOffset)
Creates and remembers a bottom axis (i.e., a HorizontalAxis with AxisPosition.Horizontal.Bottom).
- Parameters:
label- the TextComponent to use for the labels.axis- the LineComponent to use for the axis line.tick- the LineComponent to use for the ticks.tickLength- the length of the ticks.guideline- the LineComponent to use for the guidelines.valueFormatter- formats the labels.sizeConstraint- defines how the HorizontalAxis is to size itself.titleComponent- an optional TextComponent to use as the axis title.title- the axis title.labelRotationDegrees- the rotation of the axis labels (in degrees).labelSpacing- how often labels (and their corresponding ticks and guidelines) should be drawn.labelOffset- the number of labels (and, for HorizontalLayout.FullWidth, their corresponding ticks and guidelines) to skip from the start.
-
-
-
-