Axis

Overview

Axisarrow-up-right draws an axis along one of a CartesianChart’s edges. There are two built-in implementations: HorizontalAxisarrow-up-right and VerticalAxisarrow-up-right. Use VerticalAxis.rememberStartarrow-up-right, HorizontalAxis.rememberToparrow-up-right, VerticalAxis.rememberEndarrow-up-right, and HorizontalAxis.rememberBottomarrow-up-right 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

HorizontalAxis.ItemPlacerarrow-up-right and VerticalAxis.ItemPlacerarrow-up-right let you customize for what x- and y-values labels and lines are displayed. Four factory functions are available:

Custom implementations can be created.

Sample charts

Last updated