From 7bfae550265a31bef21d3a2e8dbf2132cd3d0062 Mon Sep 17 00:00:00 2001 From: Ionizing <17506747+Ionizing@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:48:02 +0800 Subject: [PATCH 1/5] Make Bar.width to be Option (#230) * Make Bar.width to be Option * make bar offset float as well - update test Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> --------- Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> Co-authored-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> --- plotly/src/traces/bar.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plotly/src/traces/bar.rs b/plotly/src/traces/bar.rs index 0acaed0d..92ccc0b5 100644 --- a/plotly/src/traces/bar.rs +++ b/plotly/src/traces/bar.rs @@ -55,8 +55,8 @@ where legend_group_title: Option, opacity: Option, ids: Option>, - width: Option, - offset: Option>, + width: Option, + offset: Option>, text: Option>, #[serde(rename = "textposition")] text_position: Option>, @@ -162,8 +162,8 @@ mod tests { .legend_group_title("legend-group-title") .marker(Marker::new()) .name("Bar") - .offset(5) - .offset_array(vec![5, 5]) + .offset(5.0) + .offset_array(vec![5.0, 5.0]) .offset_group("offset_group") .opacity(0.5) .orientation(Orientation::Vertical) @@ -178,7 +178,7 @@ mod tests { .text_template("text_template") .text_template_array(vec!["text_template"]) .visible(Visible::LegendOnly) - .width(999) + .width(999.0) .x_axis("xaxis") .x_calendar(Calendar::Nanakshahi) .y_axis("yaxis") @@ -197,8 +197,8 @@ mod tests { "legendgrouptitle": {"text": "legend-group-title"}, "opacity": 0.5, "ids": ["1"], - "width": 999, - "offset": [5, 5], + "width": 999.0, + "offset": [5.0, 5.0], "text": ["text"], "textposition": ["none"], "texttemplate": ["text_template"], From e3052a575f7194f5b10d3ed7c101b8a2f55edc2f Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 29 Aug 2024 22:07:12 +0200 Subject: [PATCH 2/5] Add 'plotly_noembed' cargo feature This adds a new `plotly_noembed` feature that can be used to reduce the sizes of binaries by not embedding `plotly.min.js`. Since askama can not handle compile-time flags, we had to duplicate the `plot.html` and `static_plot.html` templates, where the new `*_noembed.html` version only contains the CDN-variant. The `use_local_plotly` option has been feature-gated such that it is not available when using the new feature. I verified that this works by building an application that depends on plotly.rs (including optimization and LTO in all cases): no plotly: 4.96 MiB (5,201,920 bytes) master: 8.96 MiB (9,400,320 bytes) this branch: 5.44 MiB (5,701,632 bytes) The difference between this branch and master is 3,698,688 bytes, which is very close to the size of `plotly.min.js` (3,686,400 bytes). Just as expected. --- CHANGELOG.md | 4 +++ README.md | 5 ++++ plotly/Cargo.toml | 1 + plotly/src/plot.rs | 25 ++++++++++++++++++ plotly/templates/plot_noembed.html | 22 ++++++++++++++++ plotly/templates/static_plot_noembed.html | 32 +++++++++++++++++++++++ 6 files changed, 89 insertions(+) create mode 100644 plotly/templates/plot_noembed.html create mode 100644 plotly/templates/static_plot_noembed.html diff --git a/CHANGELOG.md b/CHANGELOG.md index b645edc1..d01ff94b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.10.0] - 2024-xx-xx +### Added +- [[#231](https://github.com/plotly/plotly.rs/pull/231)] Added new `plotly_noembed` feature to reduce binary sizes by not embedding `plotly.min.js`. + ## [0.9.1] - 2024-09-06 ### Added - [[#217](https://github.com/plotly/plotly.rs/pull/217)] Added show_html(filename) method to bypass situations where accessing default `/tmp` is not possible, e.g., with in SNAP Firefox diff --git a/README.md b/README.md index 64a46609..880c9f90 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,11 @@ Adds trait implementations so that `image::RgbImage` and `image::RgbaImage` can Adds support for creating plots directly using [ndarray](https://github.com/rust-ndarray/ndarray) types. +### `plotly_noembed` + +This feature can be used to reduce the binary size by not embedding `plotly.min.js`. This requires the use of the CDN version, +and disables the `use_local_plotly` method. + ### `wasm` Enables compilation for the `wasm32-unknown-unknown` target and provides access to a `bindings` module containing wrappers around functions exported by the plotly.js library. diff --git a/plotly/Cargo.toml b/plotly/Cargo.toml index 6f8cf593..98d945c5 100644 --- a/plotly/Cargo.toml +++ b/plotly/Cargo.toml @@ -17,6 +17,7 @@ exclude = ["target/*"] kaleido = ["plotly_kaleido"] plotly_ndarray = ["ndarray"] plotly_image = ["image"] +plotly_noembed = [] wasm = ["getrandom", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"] with-axum = ["rinja/with-axum", "rinja_axum"] diff --git a/plotly/src/plot.rs b/plotly/src/plot.rs index 716fa784..dce360c7 100644 --- a/plotly/src/plot.rs +++ b/plotly/src/plot.rs @@ -11,6 +11,7 @@ use serde::Serialize; use crate::{Configuration, Layout}; +#[cfg(not(feature = "plotly_noembed"))] #[derive(Template)] #[template(path = "plot.html", escape = "none")] struct PlotTemplate<'a> { @@ -18,6 +19,14 @@ struct PlotTemplate<'a> { remote_plotly_js: bool, } +#[cfg(feature = "plotly_noembed")] +#[derive(Template)] +#[template(path = "plot_noembed.html", escape = "none")] +struct PlotTemplate<'a> { + plot: &'a Plot, +} + +#[cfg(not(feature = "plotly_noembed"))] #[derive(Template)] #[template(path = "static_plot.html", escape = "none")] #[cfg(not(target_family = "wasm"))] @@ -29,6 +38,17 @@ struct StaticPlotTemplate<'a> { height: usize, } +#[cfg(feature = "plotly_noembed")] +#[derive(Template)] +#[template(path = "static_plot_noembed.html", escape = "none")] +#[cfg(not(target_family = "wasm"))] +struct StaticPlotTemplate<'a> { + plot: &'a Plot, + format: ImageFormat, + width: usize, + height: usize, +} + #[derive(Template)] #[template(path = "inline_plot.html", escape = "none")] struct InlinePlotTemplate<'a> { @@ -182,6 +202,7 @@ pub struct Plot { #[serde(rename = "config")] configuration: Configuration, #[serde(skip)] + #[cfg(not(feature = "plotly_noembed"))] remote_plotly_js: bool, } @@ -190,6 +211,7 @@ impl Plot { pub fn new() -> Plot { Plot { traces: Traces::new(), + #[cfg(not(feature = "plotly_noembed"))] remote_plotly_js: true, ..Default::default() } @@ -203,6 +225,7 @@ impl Plot { /// Note that when using `Plot::to_inline_html()`, it is assumed that the /// `plotly.js` library is already in scope, so setting this attribute /// will have no effect. + #[cfg(not(feature = "plotly_noembed"))] pub fn use_local_plotly(&mut self) { self.remote_plotly_js = false; } @@ -422,6 +445,7 @@ impl Plot { fn render(&self) -> String { let tmpl = PlotTemplate { plot: self, + #[cfg(not(feature = "plotly_noembed"))] remote_plotly_js: self.remote_plotly_js, }; tmpl.render().unwrap() @@ -432,6 +456,7 @@ impl Plot { let tmpl = StaticPlotTemplate { plot: self, format, + #[cfg(not(feature = "plotly_noembed"))] remote_plotly_js: self.remote_plotly_js, width, height, diff --git a/plotly/templates/plot_noembed.html b/plotly/templates/plot_noembed.html new file mode 100644 index 00000000..898914a9 --- /dev/null +++ b/plotly/templates/plot_noembed.html @@ -0,0 +1,22 @@ + + + + + + + + +
+ + + +
+ + +
+ + + diff --git a/plotly/templates/static_plot_noembed.html b/plotly/templates/static_plot_noembed.html new file mode 100644 index 00000000..7c8d86d2 --- /dev/null +++ b/plotly/templates/static_plot_noembed.html @@ -0,0 +1,32 @@ + + + + + + +
+ + + + + + + +
+ + From 1fe6f11bc8b011e0d88a1fd138968de45491f001 Mon Sep 17 00:00:00 2001 From: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> Date: Fri, 13 Sep 2024 18:05:18 +0200 Subject: [PATCH 3/5] make embedded plotly.js as opt-in via feature flag Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> --- CHANGELOG.md | 2 +- README.md | 15 +++-- plotly/Cargo.toml | 2 +- plotly/src/plot.rs | 71 ++++++++++------------- plotly/templates/plot.html | 7 +-- plotly/templates/plot_noembed.html | 22 ------- plotly/templates/static_plot.html | 9 +-- plotly/templates/static_plot_noembed.html | 32 ---------- 8 files changed, 47 insertions(+), 113 deletions(-) delete mode 100644 plotly/templates/plot_noembed.html delete mode 100644 plotly/templates/static_plot_noembed.html diff --git a/CHANGELOG.md b/CHANGELOG.md index d01ff94b..b07e28ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [0.10.0] - 2024-xx-xx ### Added -- [[#231](https://github.com/plotly/plotly.rs/pull/231)] Added new `plotly_noembed` feature to reduce binary sizes by not embedding `plotly.min.js`. +- [[#231](https://github.com/plotly/plotly.rs/pull/231)] Added new `plotly_embed_js` feature to reduce binary sizes by not embedding `plotly.min.js` in the library unless explicitly enabled via the feature flag. Deprecates `use_local_plotly` in favor of explicit opt-in via the feature flag and introduce method `use_cdn_plotly` to allow users to use CDN version even behind the `plotly_embed_js` feature flag. ## [0.9.1] - 2024-09-06 ### Added diff --git a/README.md b/README.md index 880c9f90..f826e5d4 100644 --- a/README.md +++ b/README.md @@ -78,12 +78,12 @@ plot.add_trace(trace); plot.write_html("out.html"); ``` -By default, the Plotly JavaScript library will be included via CDN, which results in a smaller filesize, but slightly slower first load as the JavaScript library has to be downloaded first. To instead embed the JavaScript library (several megabytes in size) directly into the HTML file, the following can be done: +By default, the Plotly JavaScript library will be included via CDN, which results in a smaller filesize, but slightly slower first load as the JavaScript library has to be downloaded first. To instead embed the JavaScript library (several megabytes in size) directly into the HTML file, the library must be compiled with the feature flag `plotly_embed_js`. Once enabled, by default the JavaScript library is directly embedded in the generated HTML file. It is still possible to use the CDN version, by using the `use_cdn_plotly` method. ```rust // <-- Create a `Plot` --> -plot.use_local_plotly(); +plot.use_cdn_plotly(); plot.write_html("out.html"); ``` @@ -201,10 +201,15 @@ Adds trait implementations so that `image::RgbImage` and `image::RgbaImage` can Adds support for creating plots directly using [ndarray](https://github.com/rust-ndarray/ndarray) types. -### `plotly_noembed` +### `plotly_embed_js` -This feature can be used to reduce the binary size by not embedding `plotly.min.js`. This requires the use of the CDN version, -and disables the `use_local_plotly` method. +By default, the CDN version of `plotly.js` is used in the library and in the generated HTML files. This feature can be used to opt in for embedding `plotly.min.js` in the generated HTML files. The benefit is that the plot will load faster in the browser. + +However, there are two downsides of using this feature flag, one is that the resulting html will be much larger, as a copy of the `plotly.min.js` library is embedded in each HTML file. The second, more relevant, is that a copy of the `plotly.min.js` library needs to be compiled in the `plotly-rs` library itself which increases the size by approx `3.5 Mb`. + +When the feature is enabled, users can still opt in for the CDN version by using the method `use_cdn_plotly`. + +Note that when using `Plot::to_inline_html()`, it is assumed that the `plotly.js` library is already in scope within the HTML file, so enabling this feature flag will have no effect. ### `wasm` diff --git a/plotly/Cargo.toml b/plotly/Cargo.toml index 98d945c5..fe472bd7 100644 --- a/plotly/Cargo.toml +++ b/plotly/Cargo.toml @@ -17,7 +17,7 @@ exclude = ["target/*"] kaleido = ["plotly_kaleido"] plotly_ndarray = ["ndarray"] plotly_image = ["image"] -plotly_noembed = [] +plotly_embed_js = [] wasm = ["getrandom", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"] with-axum = ["rinja/with-axum", "rinja_axum"] diff --git a/plotly/src/plot.rs b/plotly/src/plot.rs index dce360c7..1936b1c6 100644 --- a/plotly/src/plot.rs +++ b/plotly/src/plot.rs @@ -11,40 +11,20 @@ use serde::Serialize; use crate::{Configuration, Layout}; -#[cfg(not(feature = "plotly_noembed"))] #[derive(Template)] #[template(path = "plot.html", escape = "none")] struct PlotTemplate<'a> { plot: &'a Plot, - remote_plotly_js: bool, + plotly_js_source: String, } -#[cfg(feature = "plotly_noembed")] -#[derive(Template)] -#[template(path = "plot_noembed.html", escape = "none")] -struct PlotTemplate<'a> { - plot: &'a Plot, -} - -#[cfg(not(feature = "plotly_noembed"))] #[derive(Template)] #[template(path = "static_plot.html", escape = "none")] #[cfg(not(target_family = "wasm"))] struct StaticPlotTemplate<'a> { plot: &'a Plot, format: ImageFormat, - remote_plotly_js: bool, - width: usize, - height: usize, -} - -#[cfg(feature = "plotly_noembed")] -#[derive(Template)] -#[template(path = "static_plot_noembed.html", escape = "none")] -#[cfg(not(target_family = "wasm"))] -struct StaticPlotTemplate<'a> { - plot: &'a Plot, - format: ImageFormat, + plotly_js_source: String, width: usize, height: usize, } @@ -202,8 +182,7 @@ pub struct Plot { #[serde(rename = "config")] configuration: Configuration, #[serde(skip)] - #[cfg(not(feature = "plotly_noembed"))] - remote_plotly_js: bool, + plotly_js_source: String, } impl Plot { @@ -211,23 +190,18 @@ impl Plot { pub fn new() -> Plot { Plot { traces: Traces::new(), - #[cfg(not(feature = "plotly_noembed"))] - remote_plotly_js: true, + plotly_js_source: Self::plotly_js_source(), ..Default::default() } } - /// This option results in the plotly.js library being written directly in - /// the html output. The benefit is that the plot will load faster in - /// the browser and the downside is that the resulting html will be much - /// larger. - /// - /// Note that when using `Plot::to_inline_html()`, it is assumed that the - /// `plotly.js` library is already in scope, so setting this attribute - /// will have no effect. - #[cfg(not(feature = "plotly_noembed"))] - pub fn use_local_plotly(&mut self) { - self.remote_plotly_js = false; + /// Switch to CDN `plotly.js` in the generated HTML instead of the default + /// local `plotly.js` version. Method is only available when the feature + /// `plotly_embed_js` is enabled since without this feature the default + /// version used is always the CDN version. + #[cfg(feature = "plotly_embed_js")] + pub fn use_cdn_plotly(&mut self) { + self.plotly_js_source = Self::cdn_plotly_js(); } /// Add a `Trace` to the `Plot`. @@ -445,8 +419,7 @@ impl Plot { fn render(&self) -> String { let tmpl = PlotTemplate { plot: self, - #[cfg(not(feature = "plotly_noembed"))] - remote_plotly_js: self.remote_plotly_js, + plotly_js_source: self.plotly_js_source.clone(), }; tmpl.render().unwrap() } @@ -456,8 +429,7 @@ impl Plot { let tmpl = StaticPlotTemplate { plot: self, format, - #[cfg(not(feature = "plotly_noembed"))] - remote_plotly_js: self.remote_plotly_js, + plotly_js_source: self.plotly_js_source.clone(), width, height, }; @@ -472,6 +444,23 @@ impl Plot { tmpl.render().unwrap() } + fn plotly_js_source() -> String { + if cfg!(feature = "plotly_embed_js") { + Self::local_plotly_js() + } else { + Self::cdn_plotly_js() + } + } + + fn local_plotly_js() -> String { + let local_plotly = include_str!("../templates/plotly.min.js"); + format!("", local_plotly).to_string() + } + + fn cdn_plotly_js() -> String { + r##""##.to_string() + } + pub fn to_json(&self) -> String { serde_json::to_string(self).unwrap() } diff --git a/plotly/templates/plot.html b/plotly/templates/plot.html index a5236ac7..22b8e0b4 100644 --- a/plotly/templates/plot.html +++ b/plotly/templates/plot.html @@ -8,11 +8,8 @@
- {% if remote_plotly_js -%} - - {% else -%} - - {% endif -%} + + {{plotly_js_source}}
diff --git a/plotly/templates/plot_noembed.html b/plotly/templates/plot_noembed.html deleted file mode 100644 index 898914a9..00000000 --- a/plotly/templates/plot_noembed.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
- - - -
- - -
- - - diff --git a/plotly/templates/static_plot.html b/plotly/templates/static_plot.html index c5631596..4586ad1d 100644 --- a/plotly/templates/static_plot.html +++ b/plotly/templates/static_plot.html @@ -6,11 +6,8 @@
- {% if remote_plotly_js -%} - - {% else -%} - - {% endif -%} + + {{plotly_js_source}} @@ -33,4 +30,4 @@
- \ No newline at end of file + diff --git a/plotly/templates/static_plot_noembed.html b/plotly/templates/static_plot_noembed.html deleted file mode 100644 index 7c8d86d2..00000000 --- a/plotly/templates/static_plot_noembed.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -
- - - - - - - -
- - From 491ba7999e9c9da8d1ddff6a8bd07531458dbccc Mon Sep 17 00:00:00 2001 From: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> Date: Fri, 13 Sep 2024 18:55:20 +0200 Subject: [PATCH 4/5] update changelog Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b07e28ba..c718ce78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [0.10.0] - 2024-xx-xx ### Added - [[#231](https://github.com/plotly/plotly.rs/pull/231)] Added new `plotly_embed_js` feature to reduce binary sizes by not embedding `plotly.min.js` in the library unless explicitly enabled via the feature flag. Deprecates `use_local_plotly` in favor of explicit opt-in via the feature flag and introduce method `use_cdn_plotly` to allow users to use CDN version even behind the `plotly_embed_js` feature flag. +- [[#230](https://github.com/plotly/plotly.rs/pull/230)] Make Bar chart `width` and `offset` accept `f64` values. ## [0.9.1] - 2024-09-06 ### Added From a33095a49c6d3018fd14809e4664b997ad4de441 Mon Sep 17 00:00:00 2001 From: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:01:57 +0200 Subject: [PATCH 5/5] bump version number Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com> --- CHANGELOG.md | 8 +++++--- README.md | 6 +++--- docs/book/src/getting_started.md | 4 ++-- plotly/Cargo.toml | 8 ++++---- plotly_derive/Cargo.toml | 2 +- plotly_kaleido/Cargo.toml | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c718ce78..bc20c273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.10.0] - 2024-xx-xx +## [0.10.0] - 2024-09-16 ### Added - [[#231](https://github.com/plotly/plotly.rs/pull/231)] Added new `plotly_embed_js` feature to reduce binary sizes by not embedding `plotly.min.js` in the library unless explicitly enabled via the feature flag. Deprecates `use_local_plotly` in favor of explicit opt-in via the feature flag and introduce method `use_cdn_plotly` to allow users to use CDN version even behind the `plotly_embed_js` feature flag. -- [[#230](https://github.com/plotly/plotly.rs/pull/230)] Make Bar chart `width` and `offset` accept `f64` values. -## [0.9.1] - 2024-09-06 +### Fixed +- [[#230](https://github.com/plotly/plotly.rs/pull/230)] Make Bar chart `width` and `offset` use `f64` values. + +## [0.10.0] - 2024-09-06 ### Added - [[#217](https://github.com/plotly/plotly.rs/pull/217)] Added show_html(filename) method to bypass situations where accessing default `/tmp` is not possible, e.g., with in SNAP Firefox - [[#227](https://github.com/plotly/plotly.rs/pull/227)] Switch from HTML template render from `askama` to `rinja` diff --git a/README.md b/README.md index f826e5d4..4849b39b 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -plotly = "0.9.1" +plotly = "0.10.0" ``` ## Exporting an Interactive Plot @@ -103,7 +103,7 @@ To save a plot as a static image, the `kaleido` feature is required: # Cargo.toml [dependencies] -plotly = { version = "0.9.1", features = ["kaleido"] } +plotly = { version = "0.10.0", features = ["kaleido"] } ``` With this feature enabled, plots can be saved as any of `png`, `jpeg`, `webp`, `svg`, `pdf` and `eps`. Note that the plot will be a static image, i.e. they will be non-interactive. @@ -130,7 +130,7 @@ Using `Plotly.rs` in a Wasm-based frontend framework is possible by enabling the # Cargo.toml [dependencies] -plotly = { version = "0.9.1", features = ["wasm"] } +plotly = { version = "0.10.0", features = ["wasm"] } ``` First, make sure that you have the Plotly JavaScript library in your base HTML template: diff --git a/docs/book/src/getting_started.md b/docs/book/src/getting_started.md index e0a069f3..f6d3a37e 100644 --- a/docs/book/src/getting_started.md +++ b/docs/book/src/getting_started.md @@ -22,7 +22,7 @@ To start using [plotly.rs](https://github.com/plotly/plotly.rs) in your project ```toml [dependencies] -plotly = "0.9.1" +plotly = "0.10.0" ``` [Plotly.rs](https://github.com/plotly/plotly.rs) is ultimately a thin wrapper around the `plotly.js` library. The main job of this library is to provide `structs` and `enums` which get serialized to `json` and passed to the `plotly.js` library to actually do the heavy lifting. As such, if you are familiar with `plotly.js` or its derivatives (e.g. the equivalent Python library), then you should find [`plotly.rs`](https://github.com/plotly/plotly.rs) intuitive to use. @@ -97,7 +97,7 @@ To add the ability to save plots in the following formats: png, jpeg, webp, svg, ```toml [dependencies] -plotly = { version = "0.9.1", features = ["kaleido"] } +plotly = { version = "0.10.0", features = ["kaleido"] } ``` ## WebAssembly Support diff --git a/plotly/Cargo.toml b/plotly/Cargo.toml index fe472bd7..553a3a7d 100644 --- a/plotly/Cargo.toml +++ b/plotly/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly" -version = "0.9.1" +version = "0.10.0" description = "A plotting library powered by Plotly.js" authors = ["Ioannis Giagkiozis "] license = "MIT" @@ -29,8 +29,8 @@ erased-serde = "0.4" getrandom = { version = "0.2", features = ["js"], optional = true } image = { version = "0.25", optional = true } js-sys = { version = "0.3", optional = true } -plotly_derive = { version = "0.9.1", path = "../plotly_derive" } -plotly_kaleido = { version = "0.9.1", path = "../plotly_kaleido", optional = true } +plotly_derive = { version = "0.10.0", path = "../plotly_derive" } +plotly_kaleido = { version = "0.10.0", path = "../plotly_kaleido", optional = true } ndarray = { version = "0.16.0", optional = true } once_cell = "1" serde = { version = "1.0.132", features = ["derive"] } @@ -47,5 +47,5 @@ image = "0.25" itertools = ">=0.10, <0.14" itertools-num = "0.1.3" ndarray = "0.16.0" -plotly_kaleido = { version = "0.9.1", path = "../plotly_kaleido" } +plotly_kaleido = { version = "0.10.0", path = "../plotly_kaleido" } rand_distr = "0.4" diff --git a/plotly_derive/Cargo.toml b/plotly_derive/Cargo.toml index 61266795..25814d2a 100644 --- a/plotly_derive/Cargo.toml +++ b/plotly_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly_derive" -version = "0.9.1" +version = "0.10.0" description = "Internal proc macro crate for Plotly-rs." authors = ["Ioannis Giagkiozis "] license = "MIT" diff --git a/plotly_kaleido/Cargo.toml b/plotly_kaleido/Cargo.toml index 5819edbc..544fde05 100644 --- a/plotly_kaleido/Cargo.toml +++ b/plotly_kaleido/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly_kaleido" -version = "0.9.1" +version = "0.10.0" description = "Additional output format support for plotly using Kaleido" authors = ["Ioannis Giagkiozis "] license = "MIT"