Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export to HTML viewer tools #71

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Conversation

Carifio24
Copy link
Member

This PR adds tools to the viewers to allow exporting the current figure to an interactive HTML file. This is essentially the equivalent of the Plotly export tools for the matplotlib and bqplot viewers, but since the viewers here are already using Plotly, we can just directly use the viewer figure's ability to export to HTML. Since we restrict a lot of the default Plotly functionality (zooming, selection, panning, etc.) and then expose them via tools in the viewer, we make sure to re-enable these in the exported HTML.

For selecting an export filepath, these tools use the same ipyfilechooser setup that the bqplot exporters already use. Thus, I've refactored this out into a base Jupyter export tool so that both the exporters and this saving tool can share that functionality.

@Carifio24 Carifio24 merged commit 34e2316 into glue-viz:main Jun 3, 2024
31 of 33 checks passed
@Carifio24 Carifio24 added enhancement New feature or request viewers labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request viewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant