Merged
Conversation
971ae11 to
8bf7da9
Compare
8755be0 to
0a46de0
Compare
7306ae3 to
1373e12
Compare
Add static export functionality using WebDriver to control a host
browser.
- allow user to reuse the exporter object but also keep the old style
Kaleido API
- allow user to set browser capabilities via setter
- allow user to configure html2pdf timeout
- 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
- use build.rs to download webdriver chromedriver/geckodriver
- contains documentation and add example for plotly_static
- include an example on how to use static export for json data
- refactored usage of imageformat between packages: plotly,
plotly_kaleido, plotly_static
- the new static export is included in the plotly crate as default and kaleido is marked as
deprecated using deprecation warnings
- added custom CI setup for Windows as Windows GitHub Action with Chrome setup is unique
- expand ci with Firefox + Ubuntu for plotly_static
- add ci step for publishing plotly_static
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
1373e12 to
cddff80
Compare
This was referenced Jul 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The latest release of Kaleido in https://github.com/plotly/Kaleido is now a purely Python app that drives Chrome via the DevTools Protocol (CDP) based on Chorepgrapher. This doesn't fit with the rationale of this Rust crate.
This PR introudces a different approach based on a similar phylosophy as Choreographer, by driving browsers using WebDriver. This PR introduces similar methods as the ones in the
plotly_kaleidocrate to export static images using either geckodriver + Firefox or chromedriver + Chrome/Chromium.This new pacakge can also be used standalone, outside the plotly.rs usecase, to export Plotly plots from JSON values to static images.
Note that EPS is no longer supported (and in fact it either never worked with Kaleido since long ago or it always required a token for export as EPS and PDF are not open plotly features)