Open SPC-code opened 3 months ago
You can use a LongLinearAxisModel for representing date types and use kotlinx-datetime to format it. I have created a sample that does this.
I realize this isn't the same as having a natively supported type, but I don't want to add kotlinx-datetime as a required dependency. This is a good use case for an extension library that people can optionally include to support additional data types.
My own crude implementation of time-axis is here: https://git.sciprog.center/kscience/controls-kt/src/branch/dev/controls-visualisation-compose/src/commonMain/kotlin/TimeAxisModel.kt
For dynamic data it is important to have time-based axis (preferably based on Kotlinx-datetime
Instant
. It requires #63 to work properly.