Axis
Overview
Axis draws an axis along one of a CartesianChart’s edges. There are two built-in implementations: HorizontalAxis and VerticalAxis. Use VerticalAxis.rememberStart, HorizontalAxis.rememberTop, VerticalAxis.rememberEnd, and HorizontalAxis.rememberBottom to instantiate these:
rememberCartesianChart(
startAxis = VerticalAxis.rememberStart(/* ... */),
topAxis = HorizontalAxis.rememberTop(/* ... */),
endAxis = VerticalAxis.rememberEnd(/* ... */),
bottomAxis = HorizontalAxis.rememberBottom(/* ... */),
// ...
)Numerous customization options are available; you can change the appearance of the labels, modify the axis lines, add titles, and more.
ItemPlacer
ItemPlacerHorizontalAxis.ItemPlacer and VerticalAxis.ItemPlacer let you customize for what x- and y-values labels and lines are displayed. Four factory functions are available:
HorizontalAxis.ItemPlacer.aligned(default)VerticalAxis.ItemPlacer.step(default)
Custom implementations can be created.
Sample charts
Last updated