Skip to content
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

[Feature] 饼图各部分之间提供间隙支持 #19066

Closed
zhouzhili opened this issue Sep 1, 2023 · 1 comment · Fixed by #19076
Closed

[Feature] 饼图各部分之间提供间隙支持 #19066

zhouzhili opened this issue Sep 1, 2023 · 1 comment · Fixed by #19076

Comments

@zhouzhili
Copy link

What problem does this feature solve?

给饼图的itemStyle 增加gap属性支持,使其可以配置间隙,这种设计目前很常见,但是官方没有支持直接配置间隙的方法。

目前看到2种解决方案都有缺陷,
一是使用borderColor和borderWidth,但是配置透明色时不会渲染,当背景面板是渐变色或者图片时,这种方法不能满足需求

二是使用示例中的,itemStyle: { color: 'transparent' },但是当点击图例关闭某一项时,间隔依然存在,会越来越大,体验也不满足需求。

image

我的示例:间隙饼图

What does the proposed API look like?

提供官方支持的间隔配置,例如增加gap属性来支持饼图间隔,可以是弧度或者像素宽度等

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Sep 1, 2023
@echarts-bot
Copy link

echarts-bot bot commented Sep 1, 2023

@zhouzhili 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

[Feature] Provides clearance support between parts of a pie chart

BODY

What problem does this feature solve?

Add gap attribute support to the itemStyle of the pie chart so that the gap can be configured. This design is currently very common, but there is no official way to directly configure the gap.

At present, both solutions are seen to be flawed,
One is to use borderColor and borderWidth, but it will not be rendered when the transparent color is configured. When the background panel is a gradient color or a picture, this method cannot meet the demand

The second is to use itemStyle: { color: 'transparent' } in the example, but when you click the legend to close an item, the interval still exists, and it will become larger and larger, and the experience does not meet the requirements.

image

My example: [Gap pie chart](https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=G4QwTgBAJiAuICkDOB7AdhAvBA3gKAmgEsBbAUzSSPSQC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IFT9A hBw9IsLTLNpGyejABLEjZCxktgBiSHoSHNGBDz9GUvh9OtABxL96GyfSorAT8YZspqLCsWgdowu94D8-zYAC1Ygt3IQwAvBDv32UNRH6fZBDsbIABZBFEEC-um1s5rGRa4vB4aUr65bVpJ4Iwe4di qpq07owACQGoasgRjRrRiogoFgNWIEcLaZAYolkrkvbZE4w7-KeQTGgBMiwbIOg7kKYJ1yEKwdhxFhYRYJ6dm4YlkONsjJOOsh5opKAiE4H3mF-vShHqDSpDGTjXrAIy0FIOBoL4gTE7GbzicYJh 1ORJhdMkearHmrc2oZ4JTRJT8ngd4InhAOCyH7rvu40A6K9dsgxk2ifnDGRf54gE5ziAA)

What does the proposed API look like?

Provide officially supported interval configurations, such as adding gap attributes to support pie chart intervals, which can be radians or pixel widths, etc.

@plainheart plainheart added topic: pie and removed pending We are not sure about whether this is a bug/new feature. labels Sep 1, 2023
@plainheart plainheart added this to the TBD milestone Sep 1, 2023
@Ovilia Ovilia removed this from the TBD milestone Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants