Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 63 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,83 @@
# Changelog
All notable changes to this project will be documented in this file.

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

## 0.7.1.1 - 2024-12-11

### Added

- Compose demo

### Changed

- Migrated to DF 0.8

### Deprecated
### Removed

- Grid view

### Fixed

- Wrong script reference for static file generation
- Fixed rendering for Jupyter lab

## 0.7.1 - 2024-02-22

### Added

- Compose demo

### Changed

- Migrated to DF 0.8

### Removed

- Grid view

### Fixed

### Security
- Fixed rendering for Jupyter lab

## 0.6.0 - 2023-07-29

### Added

- Add experimental support for events on JS

### Changed

- DataForge 0.6.2
- Use a self-made Plotly-js bundle instead of one from CDN

## 0.5.3 - 2023-04-01

### Added

- API for background images (https://github.com/SciProgCentre/plotly.kt/issues/49)
- API for multiple Y axis (https://github.com/SciProgCentre/plotly.kt/issues/92)
- Native support
- `plotlykt module` with basic Geo API
- DataSourceHost/DataSourcePost to configure custom networks

### Changed

- Kotlin 1.8.20
- Moved renderers to JVM to avoid confusion with JS direct element rendering.
- DataForge 0.6
Expand All @@ -49,83 +87,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Moved to Ktor 2.0

### Deprecated

- Page layout. Use VisionForge for that.

### Removed

- Moved CORS to `Plotly.serve`

### Fixed

- Added a protective copy on reading doubleArray from TraceValues
- #85
- Rendering in JS that used backend HTML generation

## 0.5.0

### Changed

- Switch to DataForge 0.5
-

## 0.4.4

### Added

- Candlestick support
- Range builders for axis

### Changed

- build tools 0.10.0
- demo projects moved to examples

### Deprecated

- Direct usage of `range` in axis

### Fixed

- #80
- Plotly coordinate array wrap is moved to the server side

## 0.4.3

### Fixed

- Proper deserialization of single plot.
- A bug in jupyter lab visualization

## 0.4.2

### Added

- `automargin` property to `Axis` according to https://plotly.com/python/reference/layout/xaxis/#layout-xaxis-automargin

### Fixed

- Remove unnecessary `kotlinx-css` dependency.
- Added compatibility mode for legacy notebooks. Use `Plotly.jupyter.notebook()` call to enable legacy mode.

## 0.4.0

### Added

- Jupyter integration plugin for server
- Separate static plot integration module in `plotlykt-jupyter`
- Expanded JS demo
- Jupyter support goes beta

### Changed

- Package change (again) to `space.kscience`
- Build tools `0.9.5`
- Kotlin `1.5.0`
- HtmlFragment renamed to PlotlyHtmlFragment

### Removed

- Local bootstrap

### Fixed

- Incomplete coverage in JS (#70)

## 0.3.1

### Added

- Table widget implementation by @ArtificialPB
- Mathjax header promoted to stable
- Tabbed plots layout (experimental)
- Trace value builders for functions and ranges (experimental)

### Changed

- **Breaking API change!** Trace `text` replaced by `TraceValues`
- Moved to DataForge 0.3 API
- Kotlin 1.4.30
Expand All @@ -134,23 +189,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replaced direct color accessor by a delegate

### Fixed

- https://github.com/mipt-npm/plotly.kt/issues/53
- Add JQuery to Bootstrap headers

## 0.3.0

### Changed

- Serialization API is encapsulated (not longer exposed) in order to provide compatibility with new serialization.
- Migration to Kotlin 1.4
- Minor breaking change in Plot to encapsulate serialization usage
- JS supports IR. LEGACY is not supported anymore.

### Fixed

- https://github.com/mipt-npm/plotly.kt/issues/51

## 0.2.0

### Added

- Experimental scripting support
- Static export via Orca
- Experimental Jupyter support
Expand All @@ -168,6 +227,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TraceValues extension for krangl columns

### Changed

- Migrated from `scientifik` to `kscience`
- Refactored packages to better suit star import style
- Removed bootstrap dependency
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ See [simpleServer](./examples/src/main/kotlin/simpleServer.kt) and
## Kotlin-JS
Plotly is a JavaScript library, yet it is convenient to have a type-safe API when using in with Kotlin-JS. The sample application is available in [js-demo](./js-demo) module. One should node that Plotly.kt for JS is not a zero-cost wrapper like TypeScript definitions, it maintains its own object structure, could generate stand-alone models and some internal optimizations.

**Plotly-kt does not support `LEGACY` JS target. Be sure to use [IR compiler](https://kotlinlang.org/docs/js-ir-compiler.html)**

## JavaFX browser
Plotly.kt could be run in a JavaFX browser. An example project is presented in [fx-demo](./fx-demo).

Expand All @@ -60,9 +58,9 @@ The examples of the notebooks are shown in [notebooks](./examples/notebooks) dir
//@file:DependsOn("space.kscience:plotlykt-server:$version") // Use this one for sever integration.
```

The module `plotly` allows rendering static plots in Jupyter. Jupyter lab is currently supported. Jupyter notebook (classic) is able to render only `PlotlyPage` objects, so one must convert plots to pages to be able to use notebook (see [demo notebook](./examples/notebooks/plotlykt-demo.ipynb)).
The module `plotly` allows rendering static plots in Jupyter. Jupyter lab is currently supported. Jupyter notebook (classic) is able to render only `PlotlyPage` objects, so one must convert plots to pages to be able to use notebook (see [demo notebook](./notebooks/plotlykt-demo-classic.ipynb)).

The module `plotly-server` adds server capabilities and allows to render dynamic plots in notebooks (see [demo notebook](./examples/notebooks/plotlykt-server-demo.ipynb)). One must note that for dynamic pages, one must pass `renderer` parameter explicitly to plot like it is done in examples.
The module `plotly-server` adds server capabilities and allows to render dynamic plots in notebooks (see [demo notebook](./notebooks/plotlykt-server-demo.ipynb)). One must note that for dynamic pages, one must pass `renderer` parameter explicitly to plot like it is done in examples.

**IMPORTANT:** By default, Plotly-kt jupyter integration is configured to work with Jupyter Lab frontend, which renders all cells in the same page. Jupyter classic notebook and DataLore use cell isolation with iframes, so you will see blanks instead of plots. It could be fixed by switching into a notebook mode by running `Plotly.jupyter.notebook()` in a cell after plotly library is loaded.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ val plotlyVersion by extra("2.29.0")

allprojects {
group = "space.kscience"
version = "0.7.0"
version = "0.7.1.1"
}

apiValidation {
Expand Down
6 changes: 3 additions & 3 deletions examples/compose-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repositories {
maven("https://jogamp.org/deployment/maven")
}

kotlin{
kotlin {
jvm()
jvmToolchain(17)
sourceSets{
jvmMain{
sourceSets {
jvmMain {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
Expand Down
11 changes: 11 additions & 0 deletions examples/notebooks/plotlykt-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
"//%use plotly"
]
},
{
"cell_type": "code",
"outputs": [],
"source": [
"Plotly.jupyter.notebook()"
],
"metadata": {
"collapsed": false
},
"execution_count": null
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
Loading
Loading