hughess commented on issue #7763: URL: https://github.com/apache/echarts/issues/7763#issuecomment-1129470048
Thanks @plainheart. As a first step to understand how it would work, I did the following: - Used the svg renderer as normal to create and display a chart - Added a custom button outside of the ECharts instance - on click, the button runs a function which: - Generates the same chart, but using the canvas renderer - Puts the chart into a hidden div - Runs `getConnectedDataURL` with type = 'png' - Uses the `download` function from the npm package `download.js` to take the connectedDataURL and save it into a png file which is downloaded in the browser This must be an inefficient way of doing it, but it works for our immediate use case. I plan to learn more about creating a temporary canvas from within ECharts so I can contribute back to the project. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org