apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.66k stars 19.61k forks source link

[Bug] 圆角环形图中设置了borderWidth后,如果borderColor设置为transparent,boderWidth会失效 #17756

Open ZHL960663295 opened 2 years ago

ZHL960663295 commented 2 years ago

Version

5.3.3

Link to Minimal Reproduction

https://codepen.io/f-re-e/pen/abGPKJo

Steps to Reproduce

1.使用echarts官网例子中的圆角环形图 2.在itemStyle: { borderRadius: 10, borderColor: 'transparent', borderWidth: 10 }, 3.在设置了borderWidth之后,如果borderColor设置为透明,borderWidth会失效

Current Behavior

设置了borderWidth之后,如果borderColor设置为透明,borderWidth失效

Expected Behavior

borderColor设置透明色可以正常显示borderWidth,也就是各模块之间的间隙

Environment

- OS:Windows 10 专业版
- Browser:Chrome 106.0.5249.103
- Framework:Vue@2

Any additional comments?

项目的需求是使用环形图,并且每项之间有间隙,在设置borderWidth和borderColor过程中发现了这个问题

echarts-bot[bot] commented 2 years ago

@ZHL960663295 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] After the borderWidth is set in the rounded circle graph, if the borderColor is set to transparent, the boderWidth will be invalid **BODY** ### Version 5.3.3 ### Link to Minimal Reproduction https://codepen.io/f-re-e/pen/abGPKJo ### Steps to Reproduce 1. Use the rounded circular chart in the example of the echarts official website 2. In itemStyle: { borderRadius: 10, borderColor: 'transparent', borderWidth: 10 }, 3. After setting borderWidth, if borderColor is set to transparent, borderWidth will be invalid ### Current Behavior After setting borderWidth, if borderColor is set to transparent, borderWidth is invalid ### Expected Behavior borderColor setting transparent color can display borderWidth normally, that is, the gap between modules ### Environment ````markdown - OS: Windows 10 Pro - Browser: Chrome 106.0.5249.103 - Framework:Vue@2 ```` ### Any additional comments? The requirement of the project is to use a ring diagram, and there is a gap between each item, and this problem was found in the process of setting borderWidth and borderColor
plainheart commented 2 years ago

目前逻辑上就是这么实现的,如果一个元素是透明的,则不会渲染之。

TLovers commented 1 year ago

目前逻辑上就是这么实现的,如果一个元素是透明的,则不会渲染之。 文档饼图部分看了一遍。 可能有的地方能实现这种效果,如果确实是想要间隙,但是间隙是透明的,我理解是实现不了的是吗?