-
Notifications
You must be signed in to change notification settings - Fork 30
Download chart with legend #192
Download chart with legend #192
Conversation
@@ -1,10 +1,9 @@ | |||
import path from 'path'; | |||
import saveSvgAsPng from 'save-svg-as-png'; |
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.
If you stop to use save-svg-as-png
, you should run npm un save-svg-as-png
.
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.
Thank you. I executed npm un save-svg-as-png
.
downloadFile(fileName, dataURL); | ||
}; | ||
|
||
export const downloadChartAsPng = async (chartDOMNode, exportName) => { |
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.
Is aysnc & await available? I don't know that @babel/env
supports it. There is no problem if possible.
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. I confirmed babel transpiles async/await correctly with current config.
please merge #204 to fix CIs error |
LGTM! |
This PR aims to enable users to download chart (including legend) as an image file.
The image file is generated at frontend as follows.
Generated png image is like: