-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
allow saving chart images #28546
allow saving chart images #28546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behavior works as expected when I was testing it locally. 👍
Codecov ReportBase: 67.37% // Head: 67.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #28546 +/- ##
==========================================
+ Coverage 67.37% 67.38% +0.01%
==========================================
Files 3328 3329 +1
Lines 97018 97098 +80
Branches 12299 12308 +9
==========================================
+ Hits 65363 65433 +70
- Misses 26547 26556 +9
- Partials 5108 5109 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
No failed tests 🎉 |
// FIXME: update PNG icon | ||
png: "M28 10.105v18.728A3.166 3.166 0 0 1 24.834 32H6.166A3.163 3.163 0 0 1 3 28.844V3.156A3.163 3.163 0 0 1 6.16 0h13.553V10.105H28zm-.215-1.684h-6.4V.311l6.4 8.11zM17 13v2h2v-2h-2zm0 4v2h2v-2h-2zm4-4v2h2v-2h-2zM7 13v2h7v-2H7zm14 4v2h2v-2h-2zM7 17v2h7v-2H7zm10 4v2h2v-2h-2zm4 0v2h2v-2h-2zM7 21v2h7v-2H7z", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kdoh were you working on an icon for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it's not blocking to get this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did notice in the network tab that html2canvas does generate a small 1px gif, maybe that's what Ryan is referring to. I don't think it's an issue though.
From a UX standpoint, I do find it slightly odd that it gives you exactly whats on the screen. When downloading the PNG from the dashboard, if your chart is on a really tiny square, then you download a really tiny image. ex:
That's probably what we expect, but I was a little surprised when playing with it. On the plus side though, it captures all your series settings!
Looking closer at Ryans screenshot, the 1px gif is not what he is referring to haha. Whoops. |
just to document, somehow my loom extension was manipulating the DOM in my browser such that it thought that the chart had zero height. It looks like sasha adjusted the css to force it to full height to fix this. |
Closes #4701
Description
A last-minute change to allow users to save png images of charts
How to verify
Saving images does not work on visualizations that have
canSavePng=false
such as tables, etc.Demo
QB:
Dashcards:
Checklist