Sample Notebook that exposes the bug is at the bottom of this description.
If I use lets-plot in a Kotlin Notebook and the notebook depends on a library that pulls in the latest kotlinx.datetime, I get
java.lang.NoSuchMethodError: 'kotlinx.datetime.LocalDateTime kotlinx.datetime.TimeZoneKt.toLocalDateTime(kotlinx.datetime.Instant, kotlinx.datetime.TimeZone)'
at org.jetbrains.letsPlot.commons.intern.datetime.Instant.toDateTime(Instant.kt:28)
at org.jetbrains.letsPlot.commons.formatting.datetime.DateTimeFormatUtil.format(DateTimeFormatUtil.kt:37)
even if I'm using java.time.Instant in my data. (See notebook details at the bottom.)
This Kotlin Notebook works fine if it does depend on the library with the latest kotlinx.datetime.
lets-plot currently uses kotlinx.datetime at 0.6.2.
There are incompatibilities between this and the latest version of kotlinx.datetime (currently 0.7.1).
This ticket is to upgrade lets-plot to the latest version of kotlinx.datetime.
Sample Notebook:
%use dataframe
%use lets-plot
---
import java.math.BigDecimal
val simple = dataFrameOf("a", "b")(java.time.Instant.parse("2026-04-05T00:00:00Z"), BigDecimal.valueOf(2.0))
simple.schema()
---
a: java.time.Instant
b: java.math.BigDecimal
---
letsPlot(simple.toMap()) { x = "a"; y = "b" } + geomLine()
The above Notebook works fine unless it depends on a library that pulls in the latest version of kotlinx.datetime.
Sample Notebook that exposes the bug is at the bottom of this description.
If I use
lets-plotin a Kotlin Notebook and the notebook depends on a library that pulls in the latestkotlinx.datetime, I geteven if I'm using
java.time.Instantin my data. (See notebook details at the bottom.)This Kotlin Notebook works fine if it does depend on the library with the latest
kotlinx.datetime.lets-plotcurrently useskotlinx.datetimeat 0.6.2.There are incompatibilities between this and the latest version of
kotlinx.datetime(currently 0.7.1).This ticket is to upgrade
lets-plotto the latest version ofkotlinx.datetime.Sample Notebook:
The above Notebook works fine unless it depends on a library that pulls in the latest version of
kotlinx.datetime.