Bottom axis valueformatting crash #937
Unanswered
siroaleksi
asked this question in
Questions
Replies: 1 comment
-
Hello, @siroaleksi. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hi, I have implemented a two series line chart using vico 2.0.0-beta.1 I need to display either measurement time or measurement day in the x-axis depending on chart style. I have converted millis into String timestamp e.g. "10:00" or "Oct 1" before doing anything with the chart.
I have created labelListKey like this
val labelListKey = remember { ExtraStore.Key<List<String>>() }
I have used remeber because without it I get null pointer exception. Then I have created key value pairs of data likeval data = xLabels.zip(data.map { it.toFloat() }).toMap()
Then I update extras and series asSeries share same x-labels. Finally in the bottomAxis I have
I have a segmented button row where I select different chart style Day, Week and Month, then I gather data from Room db before running
modelProducer.runTransaction
.Everything works well if I change style with moderate pace. If I rapidly change style, the app eventually crash.
When logging x value in the valueFormatter I get something like this.
before x values start increasing normally
At some point I get this
Am I somehow handling data incorrectly in the
which lead to this random x value before normal incremental? I have checked that the sizes of xlabels, data1 and data 2 matches before crash.
Vico version(s)
2.0.0-beta.1
UI framework(s)
Jetpack Compose
Beta Was this translation helpful? Give feedback.
All reactions