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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
4
4
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).
5
5
6
-
## [0.10.0] - 2024-10-29
6
+
## [0.10.1] - 2024-11-x
7
7
### Added
8
+
-[[#243](https://github.com/plotly/plotly.rs/pull/243)] Made `plotly_embed_js` embed all JS scripts when enabled.
9
+
Renamed `use_cdn_plotly` to `use_cdn_js`.
8
10
-[[#239](https://github.com/plotly/plotly.rs/pull/239)] Add Categorical Axis Ordering and Axis Category Array.
9
11
10
12
### Fixed
13
+
-[[#242](https://github.com/plotly/plotly.rs/issues/242)] Disable request for tex-svg.js file
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Add this to your `Cargo.toml`:
64
64
plotly = "0.10.0"
65
65
```
66
66
67
-
## Exporting an Interactive Plot
67
+
## Exporting a single Interactive Plot
68
68
69
69
Any figure can be saved as an HTML file using the `Plot.write_html()` method. These HTML files can be opened in any web browser to access the fully interactive figure.
70
70
@@ -78,12 +78,12 @@ plot.add_trace(trace);
78
78
plot.write_html("out.html");
79
79
```
80
80
81
-
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.
81
+
By default, the Plotly JavaScript library and some [MathJax](https://docs.mathjax.org/en/latest/web/components/index.html) components will always be included via CDN, which results in smaller file-size, but slightly slower first load as the JavaScript libraries have to be downloaded first. Alternatively, to embed the JavaScript libraries (several megabytes in size) directly into the HTML file, `plotly-rs`must be compiled with the feature flag `plotly_embed_js`. With this feature flag the Plotly and MathJax JavaScript libraries are directly embedded in the generated HTML file. It is still possible to use the CDN version, by using the `use_cdn_js` method.
82
82
83
83
```rust
84
84
// <-- Create a `Plot` -->
85
85
86
-
plot.use_cdn_plotly();
86
+
plot.use_cdn_js();
87
87
plot.write_html("out.html");
88
88
```
89
89
@@ -207,7 +207,7 @@ By default, the CDN version of `plotly.js` is used in the library and in the gen
207
207
208
208
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`.
209
209
210
-
When the feature is enabled, users can still opt in for the CDN version by using the method `use_cdn_plotly`.
210
+
When the feature is enabled, users can still opt in for the CDN version by using the method `use_cdn_js`.
211
211
212
212
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.
0 commit comments