В настоящее время мой код выглядит следующим образом и показывает один и тот же цвет для каждого столбца.
Код: Выделить всё
CartesianChartHost(
chart = rememberCartesianChart(
rememberColumnCartesianLayer(
ColumnCartesianLayer.ColumnProvider.series(
rememberLineComponent(
color = Color(0xFF00B7C2),
thickness = 8.dp,
shape = CorneredShape.rounded(topLeftPercent = 50, topRightPercent = 50),
)
),
columnCollectionSpacing = 16.dp,
rangeProvider = rangeProvider
),
startAxis = VerticalAxis.rememberStart(),
bottomAxis = HorizontalAxis.rememberBottom(
valueFormatter = getBottomAxisValueFormatter(
chartType = chartType, daysInMonth = daysInMonth
),
itemPlacer = remember {
HorizontalAxis.ItemPlacer.aligned(spacing = 1, addExtremeLabelPadding = true)
},
),
marker = rememberMarker(),
decorations = listOf(rememberComposeHorizontalLine(target))
), model = model, modifier = modifier
.padding(8.dp)
.fillMaxSize()
)
Подробнее здесь: https://stackoverflow.com/questions/791 ... -chart-lib