-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(svg): fix transparent color makes element not interactable in SSR and fix platform compatibility #15029
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so. A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question. If you are interested in the project, you may also subscribe our mailing list. Have a nice day! 🍵 |
1) fix apache/echarts#15023, rect path can't be closed. 2) fix apache/echarts#15029 normalize color when using SVG renderer to support more cases, for example, some tools/platforms can't recognize the alpha in color. 3) fix eslint error about `for-in`.
Hi, I encountered identical problem today while converting SVG to PDF with Inkscape. Inkscape interprets Replace var transparentElements = document.querySelectorAll('svg [fill="transparent"]');
transparentElements.forEach(function(element) {
element.setAttribute('fill', 'none');
}); |
@KamilKozera Thanks for your feedback. I believe this can work before v5.5.0 as ecomfe/zrender#767 fixed it. But in v5.5.0, to escape the behavior that cc: @Ovilia TODOs:
|
… `none` in SSR mode & fix invalid `transparent` color issue See apache/echarts#15029
@plainheart I have no objection to ecomfe/zrender#1076 but from the spec, we can see that |
And from
we can know that the meaning of So I think it should make sense to set That being said, if there is a bug with some implementation software, we could change as your PR to prevent exposing the bug. |
|
Thanks for clarifying the context, which I really got confused about. I've merged that PR. Thanks! |
Version
v5.1.1
Reproduction link
https://uzihu.csb.app/
Steps to reproduce
click save to image to download the svg result
drag the svg file into Powerpoint or Inkscape
What is expected?
transparent background
red border
What is actually happening?
black background
black background grid without border
valid SVG11 colors https://www.w3.org/TR/SVG11/types.html#DataTypeColor
The text was updated successfully, but these errors were encountered: