Closed AndreiKingsley closed 7 months ago
With default (continuous) scale it works well:
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) ) letsPlot(daysData) + geomBar() { x = "days"; fill = "days" }
But with discrete (via asDiscrete() or scaleFillDiscrete()) formatting is missing (in legend and tooltips)
asDiscrete()
scaleFillDiscrete()
letsPlot(daysData) + geomBar() { x = "days"; fill = asDiscrete("days") }
letsPlot(daysData) + geomBar() { x = "days"; fill = "days" } + scaleFillDiscrete()
Fixed via commit: https://github.com/JetBrains/lets-plot/commit/afefca4f0bf3b3f9f8a1cd6d09af804ea76493ea
Fixed in v4.7.1
With default (continuous) scale it works well:
But with discrete (via
asDiscrete()
orscaleFillDiscrete()
) formatting is missing (in legend and tooltips)