Skip to content

Commit 99443be

Browse files
committed
Release v4.11.0
1 parent 348ccbb commit 99443be

File tree

10 files changed

+274
-184
lines changed

10 files changed

+274
-184
lines changed

CHANGELOG.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,110 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
66
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). All scales should have the 'format' parameter.
77

8+
## [4.11.0] - 2025-07-25
9+
10+
This release is 100% compatible with Lets-Plot [v 4.7.0](https://github.com/JetBrains/lets-plot/releases/tag/v4.7.0),
11+
GeoTools [v 33.2](https://github.com/geotools/geotools/releases/tag/33.2)
12+
13+
### Added
14+
15+
- Time Series Plotting [[#278](https://github.com/JetBrains/lets-plot-kotlin/issues/278)],
16+
[[discussion](https://github.com/JetBrains/lets-plot-kotlin/discussions/92#discussioncomment-12976040)],
17+
[[#678](https://github.com/JetBrains/lets-plot/issues/678)],
18+
[[LPK-129](https://github.com/JetBrains/lets-plot-kotlin/issues/129)]:
19+
- Support temporal data types from `kotlinx.datetime`, `java.time`, and `java.util`.
20+
- Support for timezone-aware `java.time.ZonedDateTime` and `java.time.OffsetDateTime` objects.
21+
22+
See examples:
23+
- [Date-time cookbook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/time_date_datetime.ipynb)
24+
- [Bitcoin trading](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/trading_chart.ipynb).
25+
26+
- Geometries:
27+
28+
- `geomSina()` [[#1298](https://github.com/JetBrains/lets-plot/issues/1298)].
29+
30+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/geom_sina.ipynb).
31+
32+
- `geomTextRepel()` and `geomLabelRepel()` [[#1092](https://github.com/JetBrains/lets-plot/issues/1092)].
33+
34+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/ggrepel.ipynb).
35+
36+
- Layer Labels (Annotations):
37+
38+
- Support in `geomCrossbar()`
39+
40+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/geom_crossbar_annotation.ipynb).
41+
42+
- Support in `waterfallPlot()` via `relativeLabels` and `absoluteLabels` parameters.
43+
44+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_annotations.ipynb).
45+
46+
- New `inheritColor()` option in annotations' configuration (see example notebooks above)
47+
48+
- `waterfallPlot()` - support for combining waterfall bars with other geometry layers [[#1344](https://github.com/JetBrains/lets-plot/issues/1344)].
49+
50+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_layers.ipynb).
51+
52+
- Plot Layout:
53+
54+
- New `axisTextSpacing`, `axisTextSpacingX`, and `axisTextSpacingY` parameters in `theme()` to control spacing between axis ticks and labels.
55+
- See new [Plot Layout Diagrams](https://lets-plot.org/kotlin/presentation-options.html#plot-layout-diagrams) showing various layout options and their effects on plot appearance.
56+
57+
- More variants to specify a color by name:
58+
59+
- all HTML/CSS colors;
60+
- various naming styles, e.g., `"dark-gray"`, `"darkgrey"`, `"dark_grey"`, `"DARKGRAY"`, etc.;
61+
- grayscale colors from `"gray0"` (black) to `"gray100"` (white);
62+
63+
See [the complete list of named colors](https://lets-plot.org/kotlin/named-colors.html).
64+
65+
- `sizeUnit` parameter in `geomPoint()`, `geomText/Label()` and `geomPie()` accepts two new values: `"min"` and `"max"` [[#260](https://github.com/JetBrains/lets-plot/issues/260)].
66+
67+
`"min"` sets the size unit to the smaller of the unit steps along the x and y axes, while `"max"` sets it to the larger. <br>
68+
This allows for more flexible relative sizing of points, pies and text in plots.
69+
70+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/size_unit_min_max.ipynb).
71+
72+
73+
### Changed
74+
75+
- Continuous data on discrete scales:
76+
77+
Continuous data when used with discrete positional scales is no longer transformed to discrete data. <br>
78+
Instead, it remains continuous, allowing for precise positioning of continuous elements relative to discrete ones. <br>
79+
This resolves issues where combining discrete and continuous data in the same plot was difficult or impossible: [[#1279](https://github.com/JetBrains/lets-plot/issues/1279)].
80+
81+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/numeric_data_on_discrete_scale.ipynb).
82+
83+
> [!TIP]
84+
> New way of handling continuous data on discrete scales could potentially break existing plots.
85+
> If you want to restore a broken plot to its original form, you can use the [`asDiscrete()`](https://lets-plot.org/kotlin/as-discrete.html) function to annotate continuous data as discrete.
86+
87+
- [**BREAKING**] `geomBoxplot()`: when y-oriented, it now uses aesthetics `xlower`/`xmiddle`/`xupper` instead of `lower`/`middle`/`upper` [[#1319](https://github.com/JetBrains/lets-plot/issues/1319)].
88+
- [**BREAKING**] `waterfallPlot()`: special "flow_type" value for `label=elementText(color=...)` replaced with "inherit". See `label` in the [documentation](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot.bistro.waterfall/waterfall-plot.html).
89+
- [**DEPRECATED**] The `positionDodgeV()` function and the `"dodgev"` value for the `position` parameter are deprecated and will be removed in future releases.
90+
- Plot layout: reduced margins and spacing for title, caption, axes, and legend.
91+
- Updated RGB values for `"lightgray"` and `"green"`. To restore the previous colors, use `"gray75"` and `"lime"`, respectively.
92+
- `waterfallPlot()`: the appearance of the legend has been improved.
93+
- `geomViolin()`: tooltips are not shown in the centerline of the violin if `showHalf != 0`.
94+
- `geomCrossbar()`: the midline is not shown in the legend when `fatten` is set to 0, or when there is no mapping for it.
95+
- `geomPointrange()`: the midpoint will not be drawn if the `y` aesthetic is set to `null`.
96+
- `geomBand()`: the `alpha` aesthetic only affects the inner part of the geometry, as in `geomRect()`.
97+
- `geomBand()`: show tooltip over the whole band, not just at the edges.
98+
99+
100+
### Fixed
101+
102+
- AWT: plot prevents wheel events from bubbling up to the parent component.
103+
- `geomBoxplot`: unable to draw a y-oriented plot with `stat = Stat.identity` [[#1319](https://github.com/JetBrains/lets-plot/issues/1319)].
104+
- Can't add a layer which uses continuous data to a plot where other layers use discrete input [[#1323](https://github.com/JetBrains/lets-plot/issues/1323)].
105+
- Multiline legend labels were not vertically centered with their keys [[#1331](https://github.com/JetBrains/lets-plot/issues/1331)].
106+
- Poor alignment in legend between columns [[#1332](https://github.com/JetBrains/lets-plot/issues/1332)].
107+
- Ordered data was re-ordered by `geomBoxplot` [[#1342](https://github.com/JetBrains/lets-plot/issues/1342)].
108+
- Sec: CVE-2024-47554 (commons-io) [[#1231](https://github.com/JetBrains/lets-plot/issues/1231)]
109+
- java.util.zip.ZipException: duplicate entry: letsPlotKotlinAPI/version.properties [[#279](https://github.com/JetBrains/lets-plot-kotlin/issues/279)]
110+
111+
8112
## [4.10.0] - 2025-03-20
9113

10114
This release is 100% compatible with Lets-Plot [v 4.6.1](https://github.com/JetBrains/lets-plot/releases/tag/v4.6.1),

README.md

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ See the "Quickstart" notebook in [Datalore](https://datalore.jetbrains.com/view/
6767
- [Compose Multiplatform](#in-compose-multiplatform)
6868
- [JVM and Kotlin/JS](#in-jvm-js)
6969
- [Documentation](#documentation)
70-
- [What is new in 4.10.0](#new)
70+
- [What is new in 4.11.0](#new)
7171
- [Recent Updates in the Gallery](#recent_gallery_updates)
7272
- [Change Log](#change_log)
7373
- [Code of Conduct](#CoC)
@@ -103,7 +103,7 @@ In this case the latest `library descriptor` will be pulled from the [Kotlin Jup
103103
#### Library Descriptor Parameters
104104

105105
```
106-
%use lets-plot(v=4.10.0, isolatedFrame=false)
106+
%use lets-plot(v=4.11.0, isolatedFrame=false)
107107
```
108108
- `v` - version of the Lets-Plot Kotlin API.
109109
- `isolatedFrame` - If `false`: load JS just once per notebook (default in Jupyter).
@@ -132,38 +132,68 @@ Examples of using of the Lets-Plot Kotlin API in JVM and Kotlin/JS applications
132132

133133

134134
<a id="new"></a>
135-
## What is new in 4.10.0
135+
## What is new in 4.11.0
136136

137-
- #### Markdown Support in *Title*, *Subtitle*, *Caption*, and Axis Labels
138-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/markdown.png" alt="Markdown Support" width="400" height="237">
137+
- #### Time Series Plotting
138+
- Support temporal data types from `kotlinx.datetime`, `java.time`, and `java.util`.
139+
- Support for timezone-aware `java.time.ZonedDateTime` and `java.time.OffsetDateTime` objects.
139140

140-
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/markdown.ipynb).
141+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/time_date_datetime.png" alt="f-25b/images/time_date_datetime.png" width="400" height="237">
142+
143+
See [Date-time](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/time_date_datetime.ipynb) cookbook.
144+
<br><br>
145+
<img src="https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/images/bitcoin_trading.png" alt="f-4.11.0/images/bitcoin_trading.png" width="400" height="237">
146+
147+
See [Bitcoin trading](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/trading_chart.ipynb) demo.
148+
<br><br>
141149

142-
- #### Support for Multiline Axis Labels, Text Justification in Axis Labels
143-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/multiline_axis_labels.png" alt="Multiline Axis Labels" width="400" height="275">
150+
- #### `geomSina()` Geometry
144151

145-
See examples: [multiline axis labels](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/multiline_axis_labels.ipynb),
146-
[axis label justification](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/axis_label_justification.ipynb).
152+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/geom_sina.png" alt="f-25b/images/geom_sina.png" width="400" height="276">
147153

148-
- #### `geomHex()` Geometry
149-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/geom_hex.png" alt="Geometry Hex" width="370" height="296">
154+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/geom_sina.ipynb).
150155

151-
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_hex.ipynb).
156+
- #### `geomTextRepel()` and `geomLabelRepel()` Geometries
152157

153-
- #### `ggbunch()` Function: Combining Plots with Custom Layout
154-
It replaces the deprecated `GGBunch` class. <br/>
155-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/magnifier_inset.png" alt="Magnifier Inset" width="400" height="251">
158+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/geom_repel.png" alt="f-25b/images/geom_repel.png" width="400" height="232">
156159

157-
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/magnifier_inset.ipynb).
160+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/ggrepel.ipynb).
158161

159-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/ggbunch_kotlin_isl.png" alt="Map of Kotlin Isl." width="400" height="254">
162+
- #### `waterfallPlot()` Chart
160163

161-
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/ggbunch_kotlin_isl.ipynb).
164+
- Annotations support via `relativeLabels` and `absoluteLabels` parameters.
165+
<br><br>
166+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/waterfall_plot_annotations.png" alt="f-25b/images/waterfall_plot_annotations.png" width="400" height="253">
162167

163-
- #### Parameters `start` and `direction` in `geom_pie()` Geometry
164-
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/geom_pie_params.png" alt="Pie Params" width="400" height="119">
168+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_annotations.ipynb).
169+
<br><br>
170+
- Support for combining waterfall bars with other geometry layers.
171+
<br><br>
172+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/waterfall_plot_layers.png" alt="f-25b/images/waterfall_plot_layers.png" width="400" height="227">
165173

166-
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_pie_params.ipynb).
174+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_layers.ipynb).
175+
176+
- #### Continuous Data on Discrete Scales
177+
178+
Continuous data when used with discrete positional scales is no longer transformed to discrete data. <br>
179+
Instead, it remains continuous, allowing for precise positioning of continuous elements relative to discrete ones.
180+
<br><br>
181+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/combo_discrete_continuous.png" alt="f-25b/images/combo_discrete_continuous.png" width="400" height="151">
182+
183+
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/numeric_data_on_discrete_scale.ipynb).
184+
185+
> [!TIP]
186+
> New way of handling continuous data on discrete scales could potentially break existing plots.
187+
> If you want to restore a broken plot to its original form, you can use the [`asDiscrete()`](https://lets-plot.org/kotlin/as-discrete.html) function to annotate continuous data as discrete.
188+
189+
190+
- #### Plot Layout
191+
The default plot layout has been improved to better accommodate axis labels and titles. <br>
192+
Also, new `theme()` options `axisTextSpacing`, `axisTextSpacingX`, and `axisTextSpacingY` control spacing between axis ticks and labels.
193+
<br><br>
194+
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25b/images/plot_layout_diagram.png" alt="f-25b/images/plot_layout_diagram.png" width="400" height="175">
195+
196+
See new [Plot Layout Diagrams](https://lets-plot.org/kotlin/presentation-options.html#plot-layout-diagrams) showing various layout options and their effects on plot appearance.
167197

168198

169199
- #### And More

USAGE_BATIK_JFX_JS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ plugins {
5252

5353
dependencies {
5454
// Lets-Plot Kotlin API
55-
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.10.0")
55+
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.11.0")
5656
// Lets-Plot Multiplatform (Batik rendering)
57-
implementation("org.jetbrains.lets-plot:lets-plot-batik:4.6.1")
57+
implementation("org.jetbrains.lets-plot:lets-plot-batik:4.7.0")
5858
}
5959
```
6060

@@ -75,9 +75,9 @@ plugins {
7575

7676
dependencies {
7777
// Lets-Plot Kotlin API
78-
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.10.0")
78+
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.11.0")
7979
// Lets-Plot Multiplatform (JFX Scene rendering)
80-
implementation("org.jetbrains.lets-plot:lets-plot-jfx:4.6.1")
80+
implementation("org.jetbrains.lets-plot:lets-plot-jfx:4.7.0")
8181
}
8282
```
8383

@@ -95,7 +95,7 @@ kotlin {
9595
named("jsMain") {
9696
dependencies {
9797
// Lets-Plot Kotlin API
98-
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-js:4.10.0")
98+
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-js:4.11.0")
9999
}
100100
}
101101
}
@@ -193,7 +193,7 @@ val rawSpec = figure.toSpec()
193193
```kotlin
194194
val html: String = PlotHtmlExport.buildHtmlFromRawSpecs(
195195
plotSpec = rawSpec,
196-
scriptUrl = PlotHtmlHelper.scriptUrl(version="4.6.1"),
196+
scriptUrl = PlotHtmlHelper.scriptUrl(version="4.7.0"),
197197
iFrame = true
198198
)
199199
```

Writerside/topics/geospatial_charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The `gt-geojson` artifact from GeoTools must be also included (see compatible ve
5959
dependencies {
6060
...
6161
implementation "org.jetbrains.lets-plot-kotlin:lets-plot-kotlin-geotools:%version%"
62-
implementation "org.geotools:gt-geojson:[32.1]"
62+
implementation "org.geotools:gt-geojson:[33.2]"
6363
...
6464
}
6565
```
@@ -84,8 +84,8 @@ You can include all necessary dependencies into your notebook using the followin
8484
When declaring additional GeoTools dependencies, check the compatible version in the [CHANGELOG.md](https://github.com/JetBrains/lets-plot-kotlin/blob/master/CHANGELOG.md):
8585

8686
```
87-
@file:DependsOn("org.geotools:gt-shapefile:[32.1]")
88-
@file:DependsOn("org.geotools:gt-cql:[32.1]")
87+
@file:DependsOn("org.geotools:gt-shapefile:[33.2]")
88+
@file:DependsOn("org.geotools:gt-cql:[33.2]")
8989
```
9090

9191
### Example Notebooks

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ allprojects {
3838
group = "org.jetbrains.lets-plot"
3939
version = when (name) {
4040
"dokka" -> "4.11.0"
41-
else -> "4.11.0-SNAPSHOT"
41+
else -> "4.11.1-SNAPSHOT"
4242
// else -> "0.0.0-SNAPSHOT" // for local publishing only
4343
}
4444

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package frontendContextDemo.scripts
2+
3+
import frontendContextDemo.ScriptInBatikContext
4+
import org.jetbrains.letsPlot.geom.geomBoxplot
5+
import org.jetbrains.letsPlot.letsPlot
6+
import kotlin.random.Random
7+
import java.time.LocalDate as JavaLocalDate
8+
9+
object Issue_reordered_geomBoxplot_LP1342 {
10+
@JvmStatic
11+
fun main(args: Array<String>) {
12+
ScriptInBatikContext.eval("Issue: reordered geomBoxplot LP-1342") {
13+
val rand = Random(0L)
14+
15+
val data = mapOf(
16+
"date" to (0 until 100).map { JavaLocalDate.of(2020, 1, 1).plusDays((it % 10).toLong()).toString() },
17+
"count" to (0 until 100).map { rand.nextInt(0, 100) }
18+
)
19+
20+
run {
21+
val p = letsPlot(data) +
22+
geomBoxplot() { x = "date"; y = "count" }
23+
p.show()
24+
}
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)