echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] 文档中echartsInstance. getDataURL在选择为svg时返回的应该是URLEncode内容非base64编码内容

Open YZKnight opened this issue 4 years ago • 2 comments

Version

5.3.0

Link to Minimal Reproduction

No response

Steps to Reproduce

https://echarts.apache.org/en/api.html#echartsInstance.getDataURL 中echartsInstance.getDataURL方法 image var img = new Image(); img.src = myChart.getDataURL({ type:'svg' }); 返回的是UrlEncode而非是Base64 data:image/svg+xml;charset=UTF-8,%3Csvg%20widt

Current Behavior

Exports chart image; returns a base64 URL; can be set tosrcof Image.

Expected Behavior

Exports chart image; returns a base64 URL ( when using 'png' and 'jpg' ) or a UrlEncode URL ( when using 'svg' ); can be set tosrcof Image.

Environment

- OS: Windows 11
- Browser: Chrome 98.0.4758.82
- Framework: None

Any additional comments?

No response

YZKnight avatar Feb 16 '22 13:02 YZKnight

@YZKnight It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] echartsInstance in documentation. GetDataURL when selected as svg should return URLEncode content non-base64 encoded content

echarts-bot[bot] avatar Feb 16 '22 13:02 echarts-bot[bot]

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Feb 16 '24 21:02 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Feb 23 '24 21:02 github-actions[bot]