-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't scaleDateTime()
work by default with Instant?
#174
Comments
scaleDateTime()
work by default with Instant?
Hi! Like in this example: %use lets-plot
import java.time.Instant.parse
val instants = listOf(
"2021-01-01T00:00:00Z",
"2021-02-23T00:00:00Z",
"2021-04-03T00:00:00Z",
"2021-05-04T00:00:00Z",
"2021-10-05T00:00:00Z"
).map(::parse)
val daysData = mapOf<String, Any>(
"days" to instants,
"val" to (1..instants.size)
)
val p = letsPlot(daysData) + geomBar() { x = "days"; color = "days" }
p Am I correct? |
Yes! |
Fixed in LPK v4.4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We can use
Instant
as the data type, but we need to addscaleDatetime()
to format the axis correctly. Why don't we do this automatically when we have Instant as a data type? Including in the case ofyMin
,middle
etc. It's also a bit strange that the public api lacks something likescaleColorDatetime
, but we can implement it withThe text was updated successfully, but these errors were encountered: