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
fix(svg): fix chart cannot be exported with SVG renderer in IE. #13732
Conversation
…into fix-svg-export
Thanks for your contribution! The pull request is marked to be |
…slint." This reverts commit 5e07fa7.
Also I'm not sure if we should remove the edge condition here https://github.com/apache/incubator-echarts/blob/a3a0e4582b59dd974d349eef8dfde2b6ebe229ab/src/component/toolbox/feature/SaveAsImage.ts#L61 since edge is using chromium now |
@pissang I think we may need to tweak the logic of checking if the browser is Edge in zrender. Changes in zrender would be: // https://github.com/ecomfe/zrender/blob/master/src/core/env.ts#L58
- const edge = ua.match(/Edge\/([\d.]+)/);
+ const edge = ua.match(/Edge?\/([\d.]+)/); // make `e` optional to match new edge with chromium core. Old UserAgent
New UserAgent
Related commit in zrender is ecomfe/zrender@d53d616 So, the judgment here should be: // Chrome, Firefox, New Edge
if (typeof MouseEvent === 'function' && (env.browser.newEdge || (!env.browser.ie && !env.browser.edge))) { The related commit is 177f1fc |
I think it looks good to me. Pin @100pah to have a further check. |
It looks good to me. @plainheart |
Congratulations! Your PR has been merged. Thanks for your contribution! |
Brief Information
This pull request is in the type of:
What does this PR do?
1) fix charts cannot be exported when using SVG renderer in IE.
2) fix exported SVG file cannot be opened when using external images.
See #13655
After this fix, exporting SVG file can even be supported in IE 9.
Fixed issues
Details
Before: What was the problem?
After: How is it fixed in this PR?
Usage
Are there any API changes?
Related test cases or examples to use the new APIs
Please refer to
test/ie-svg-export.html
.Others
Merging options
Other information
Related PR in zrender ecomfe/zrender#673