diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33c8c1f3..e32ec3a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,9 @@ jobs: - run: cargo publish --allow-dirty -p plotly_kaleido - run: sleep 10 - run: cargo publish --allow-dirty -p plotly - - run: sleep 10 - - run: cargo publish --allow-dirty -p plotly_static --features webdriver_download,chromedriver + # plotly_static is not part of the same ecosystem yet so it doesn't use the same TOKEN + # - run: sleep 10 + # - run: cargo publish --allow-dirty -p plotly_static --features webdriver_download,chromedriver create-gh-release: name: Deploy to GH Releases diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d4d6751..7b09fe5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ 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.13.3] - 2025-xx-xx + +### Fixed +### Changed + +## [0.13.2] - 2025-07-12 + +### Fixed +- [[#336](https://github.com/plotly/plotly.rs/pull/336)] Fix `plotly_static` docs.rs build +- [[#327](https://github.com/plotly/plotly.rs/pull/327)] Fix book broken link + ## [0.13.1] - 2025-07-07 ### Fixed diff --git a/docs/book/src/recipes/subplots/subplots.md b/docs/book/src/recipes/subplots/subplots.md index c4e9fa73..9ed53066 100644 --- a/docs/book/src/recipes/subplots/subplots.md +++ b/docs/book/src/recipes/subplots/subplots.md @@ -24,7 +24,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:subplots_with_multiple_traces}} ``` -{{#include ../../../../../examples/subplots/output/inline_subplot_with_multiple_traces.html}} +{{#include ../../../../../examples/subplots/output/inline_subplots_with_multiple_traces.html}} ## Custom Sized Subplot diff --git a/examples/customization/consistent_static_format_export/README.md b/examples/customization/consistent_static_format_export/README.md index f8fc63ba..b40a40ba 100644 --- a/examples/customization/consistent_static_format_export/README.md +++ b/examples/customization/consistent_static_format_export/README.md @@ -4,22 +4,9 @@ This example demonstrates exporting a plot to SVG, PNG, and PDF using plotly.rs This example is based on [GitHub Issue #171](https://github.com/plotly/plotly.rs/issues/171). - -**Summary:** - For consistent font rendering across browsers and export formats, always set the `font.family` property explicitly in your plot configuration. Relying on default or generic font settings can lead to differences in appearance, especially for font size and legend layout, depending on the browser or export backend. -**Recommendation:** - -Always set the `font.family` property (e.g., to `"Times New Roman, serif"`) for all text elements (titles, axes, legends) to ensure consistent results in all output formats. - -## Overview - -This example creates a line and scatter plot with custom styling, including: -- Large font sizes for titles, legends, and axes -- Custom legend positioning and styling -- Border shapes around the plot -- Export to multiple formats (PDF, SVG, PNG) +The issue reported in [#171](https://github.com/plotly/plotly.rs/issues/171)is solved when the `font.family` property is set explicitly (e.g., to `"Times New Roman, serif"`) for all text elements (titles, axes, legends) which ensures consistent results in all output formats across different browsers. ## Running the Example @@ -29,6 +16,6 @@ cargo run ``` This will generate three output files: -- `Data_plot.pdf` - PDF format (typically renders correctly) -- `Data_plot.svg` - SVG format (may have font/legend issues) -- `Data_plot.png` - PNG format (typically renders correctly) +- `Data_plot.png` +- `Data_plot.svg` - will render fonts differently when compared with PNG if font family not fully specified +- `Data_plot.pdf` - uses SVG for PDF generation and will inherit the same issue as SVG diff --git a/plotly/Cargo.toml b/plotly/Cargo.toml index 6f0c93a5..12ce6aea 100644 --- a/plotly/Cargo.toml +++ b/plotly/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly" -version = "0.13.1" +version = "0.13.2" description = "A plotting library powered by Plotly.js" authors = [ "Ioannis Giagkiozis ", @@ -51,7 +51,7 @@ dyn-clone = "1" erased-serde = "0.4" image = { version = "0.25", optional = true } plotly_derive = { version = "0.13", path = "../plotly_derive" } -plotly_static = { version = "0.0.1", path = "../plotly_static", optional = true } +plotly_static = { version = "0.0.2", path = "../plotly_static", optional = true } plotly_kaleido = { version = "0.13", path = "../plotly_kaleido", optional = true } ndarray = { version = "0.16", optional = true } once_cell = "1" diff --git a/plotly_derive/Cargo.toml b/plotly_derive/Cargo.toml index 306fac7f..3951417e 100644 --- a/plotly_derive/Cargo.toml +++ b/plotly_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly_derive" -version = "0.13.1" +version = "0.13.2" description = "Internal proc macro crate for Plotly-rs." authors = ["Ioannis Giagkiozis "] license = "MIT" @@ -14,7 +14,7 @@ keywords = ["plot", "chart", "plotly"] quote = "1" syn = "2" proc-macro2 = "1" -darling = "0.20" +darling = "0.21" [lib] proc-macro = true diff --git a/plotly_kaleido/Cargo.toml b/plotly_kaleido/Cargo.toml index 002774b0..244de21e 100644 --- a/plotly_kaleido/Cargo.toml +++ b/plotly_kaleido/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly_kaleido" -version = "0.13.1" +version = "0.13.2" description = "Additional output format support for plotly using Kaleido" authors = [ "Ioannis Giagkiozis ", diff --git a/plotly_static/Cargo.toml b/plotly_static/Cargo.toml index 92a359fb..a2f64c4f 100644 --- a/plotly_static/Cargo.toml +++ b/plotly_static/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotly_static" -version = "0.0.1" +version = "0.0.2" description = "Export Plotly graphs to static images using WebDriver" authors = ["Andrei Gherghescu andrei-ng@protonmail.com"] license = "MIT" @@ -25,21 +25,25 @@ serde = { version = "1.0", features = ["derive"] } rand = "0.9" serde_json = "1.0" base64 = "0.22" -fantoccini = "0.21" +fantoccini = "0.22" tokio = { version = "1", features = ["full"] } anyhow = "1.0" urlencoding = "2" -reqwest = { version = "0.11", features = ["blocking"] } +reqwest = { version = "0.12", features = ["blocking"] } [dev-dependencies] plotly_static = { path = "." } ndarray = { version = "0.16" } -env_logger = "0.10" +env_logger = "0.11" clap = { version = "4.0", features = ["derive"] } [build-dependencies] tokio = { version = "1", features = ["full"] } anyhow = "1.0" -dirs = "5.0" +dirs = "6.0" zip = "4.0" webdriver-downloader = "0.16" + +# Needed for docs.rs to build the documentation +[package.metadata.docs.rs] +features = ["chromedriver"] \ No newline at end of file diff --git a/plotly_static/README.md b/plotly_static/README.md index 3fd15c7b..30240329 100644 --- a/plotly_static/README.md +++ b/plotly_static/README.md @@ -56,7 +56,7 @@ Add to your `Cargo.toml`: ```toml [dependencies] -plotly_static = { version = "0.0.1", features = ["chromedriver", "webdriver_download"] } +plotly_static = { version = "0.0.2", features = ["chromedriver", "webdriver_download"] } serde_json = "1.0" ``` diff --git a/plotly_static/src/lib.rs b/plotly_static/src/lib.rs index a2644703..38cded1f 100644 --- a/plotly_static/src/lib.rs +++ b/plotly_static/src/lib.rs @@ -74,7 +74,7 @@ //! //! ```toml //! [dependencies] -//! plotly_static = { version = "0.0.1", features = ["chromedriver", "webdriver_download"] } +//! plotly_static = { version = "0.0.2", features = ["chromedriver", "webdriver_download"] } //! ``` //! //! ## Advanced Usage