You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- allow user to reuse the exporter object
- use data uri for CDN case and file for offline case when generating the html for static image export
- there are size restrictions when using data-uri , webdriver cannot load large data-uri
files, so for offline mode, default to using html returned by to_file
- added build.rs to download webdriver chromedriver/geckodriver
- include example on how to use static export for json data
- allow user to set browser capabilities via setter
- added documentation and add example for plotly_static
- included new static export in plotly crate and marked kaleido as
deprecated using deprecation warnings
- add extra api to reuse static exporter
- refactored usage of imageformat between packages
- added custom CI setup for Windows as Windows GitHub Action for
chrome setup is unique
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,6 @@ A plotting library for Rust powered by [Plotly.js](https://plot.ly/javascript/).
53
53
54
54
Documentation and numerous interactive examples are available in the [Plotly.rs Book](https://plotly.github.io/plotly.rs/content/getting_started.html), the [examples/](https://github.com/plotly/plotly.rs/tree/main/examples) directory and [docs.rs](https://docs.rs/crate/plotly).
55
55
56
-
57
56
For changes since the last version, please consult the [changelog](https://github.com/plotly/plotly.rs/tree/main/CHANGELOG.md).
58
57
59
58
# Basic Usage
@@ -62,7 +61,7 @@ Add this to your `Cargo.toml`:
62
61
63
62
```toml
64
63
[dependencies]
65
-
plotly = "0.12"
64
+
plotly = "0.13"
66
65
```
67
66
68
67
## Exporting a single Interactive Plot
@@ -108,15 +107,40 @@ When the applications developed with `plotly.rs` are intended for other targets
108
107
109
108
Kaleido binaries are available on Github [release page](https://github.com/plotly/Kaleido/releases). It currently supports Linux(`x86_64`), Windows(`x86_64`) and MacOS(`x86_64`/`aarch64`).
110
109
111
-
## Exporting a Static Images
110
+
## Exporting Static Images with plotly_static (Recommended)
111
+
112
+
The recommended way to export static images is using the `plotly_static` backend, which uses a headless browser via WebDriver (Chrome or Firefox) for rendering. This is available via the `static_export_default` feature:
113
+
114
+
```toml
115
+
[dependencies]
116
+
plotly = { version = "0.13", features = ["static_export_default"] }
117
+
```
118
+
119
+
This supports PNG, JPEG, WEBP, SVG, and PDF formats:
**Note:** This feature requires a WebDriver-compatible browser (Chrome or Firefox) as well as a Webdriver (chromedriver/geckodriver) to be available on the system. For advanced usage, see the [`plotly_static` crate documentation](https://docs.rs/plotly_static/).
134
+
135
+
## Exporting Static Images with Kaleido (to be deprecated)
112
136
113
137
Enable the `kaleido` feature and opt in for automatic downloading of the `kaleido` binaries by doing the following
114
138
115
139
```toml
116
140
# Cargo.toml
117
141
118
142
[dependencies]
119
-
plotly = { version = "0.12", features = ["kaleido", "kaleido_download"] }
143
+
plotly = { version = "0.13", features = ["kaleido", "kaleido_download"] }
120
144
```
121
145
122
146
Alternatively, enable only the `kaleido` feature and manually install Kaleido.
0 commit comments