Closed mak1nt0sh closed 3 months ago
Also when using marker = rememberDefaultCartesianMarker(label = rememberTextComponent())
the marker text color is also wrong and the marker component is not drawn on the line. (Maybe separate issue)
Hello, and thanks for the report! We’re working on changes that will fix both this and the problem reported in issue #784.
The unexpected DefaultCartesianMarker
label color is a direct result of the bug at hand. Regarding no Component
being drawn on the line, this is expected—the default indicator
value is (and always has been) null
. You can add an indicator by passing a lambda that returns a Component
. Here’s a simple example:
rememberDefaultCartesianMarker(
label = rememberTextComponent(),
indicator = remember { { shapeComponent(color = it, shape = Shape.Pill) } },
)
We plan on introducing non-null defaults for indicator
and guideline
.
Vico 2.0.0 Alpha 26 resolves this. Cheers!
Just checked the alpha26, it's better but there are still same issues present. Now for zero values the line is split and for mixed negative/positive the marker color returns negative color for positive values in some cases.
chart = rememberCartesianChart(
rememberLineCartesianLayer(
lineProvider = LineCartesianLayer.LineProvider.series(
rememberLine(
fill = LineCartesianLayer.LineFill.double(
topFill = fill(MaterialTheme.colorScheme.primary),
bottomFill = fill(MaterialTheme.customColors.negative)
)
)
)
Thanks for letting us know, @mak1nt0sh! Since this is more closely related to issue #784, I’ve reopened that. Please see here.
How to reproduce
Observed behavior
Initial colors are good. However when the data refreshes the line seems to remember previous splitY value and doesn't update. The background color is updating though.
Expected behavior
All was working on alpha.22. The line color respected splitY = 0
Vico version(s)
2.0.0-alpha.24
Android version(s)
Any
Additional information
No response