-
Notifications
You must be signed in to change notification settings - Fork 121
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
Export as PNG function #82
Labels
Comments
rshen91
added a commit
that referenced
this issue
Nov 22, 2019
- Add PNG export of chart (including IE11!) - Story added in Interactions section Closes #82
🎉 This issue has been resolved in version 14.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
4 tasks
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this issue
Feb 10, 2022
# [14.2.0](elastic/elastic-charts@v14.1.0...v14.2.0) (2019-11-25) ### Features * add PNG export ([opensearch-project#451](elastic/elastic-charts#451)) ([53c74c5](elastic/elastic-charts@53c74c5)), closes [opensearch-project#82](elastic/elastic-charts#82)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is your feature request related to a problem? Please describe.
I want to be able to save the chart as PNG image. This can be used to simplify client side export in Kibana.
Describe the solution you'd like
Add the possibility to export the chart as a PNG via a function call to the chart.
Konva has the possibility to get the DataURL from the
Stage
object (see https://konvajs.org/docs/data_and_serialization/Stage_Data_URL.html)This, btw, will only save the chart into a PNG, not the whole chart with the legend.
A possibility for that is illustrated on https://github.com/tsayen/dom-to-image#how-it-works
but is basically the following:
foreignObject
with the cloned DOM elementDescribe alternatives you've considered
The legend can be rendered in canvas, but it's quite difficult and we need to move the whole action logic to a canvas element.
Another option is to render subsequentially a static legend on the chart canvas with only colors and texts of the existing legend.
Additional context
n/a
Kibana Cross Issues
Add any Kibana related issues/feature requests here.
Checklist
Kibana Cross Issues
listkibana cross issue
tag is associated to the issue if any kibana cross issue is presentThe text was updated successfully, but these errors were encountered: