StorageBar

fun StorageBar(data: () -> List<StorageData>, trackColor: ChartColor = Color(0xD3D3D3DE).asSolidChartColor(), modifier: Modifier = Modifier, onClick: (StorageData) -> Unit = {})

A composable function that displays a storage bar with a single track color.

Parameters

data

A list of StorageData representing the categories and their values.

trackColor

The color of the track. Default is a light gray color.

modifier

The modifier to be applied to the Canvas.

onClick

A lambda function to be invoked when a category is clicked.


fun StorageBar(data: () -> List<StorageData>, trackColors: List<Color>, modifier: Modifier = Modifier, onClick: (StorageData) -> Unit = {})

A composable function that displays a storage bar with a gradient track color.

Parameters

data

A list of StorageData representing the categories and their values.

trackColors

A list of colors to be used in the gradient of the track.

modifier

The modifier to be applied to the Canvas.

onClick

A lambda function to be invoked when a category is clicked.