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

[Bug] Pie chart roseType='area' incorrect when startAngle and endAngle given #19634

Open
MikkoSteerpath opened this issue Feb 21, 2024 · 1 comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@MikkoSteerpath
Copy link

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=pie-roseType-simple&lang=ts&code=PYBwLglsB2AEC8sDeAoWsDOBTAThLGAXLANprrLkWxgCeIWxA5CPkwDRUUZgCGOYAILQA5gBtGsAIwAOAAztYXdFmgATYeMkBmAGwLlsAPRHYAWwjRNE4noPV0OYNgAq9SU35ZeHQ2t58xGQOFEiwAG68YgCuklJyCrDQvGYeABJRAGawgkywAL6cIehhkTGSAKyJyanMGWLZAEJ5hYYlEVGxxABMCYo16VmwAMIthgC6XPnkk_kA3EA

Steps to Reproduce

Create a roseType = 'area' chart and set startAngle and endAngle so that Math.abs(startAngle - endAngle) < Math.PI * 2. Add at least two items.

Current Behavior

Both the angles and radiuses of the pie chart's items are different.

Expected Behavior

Only the radius of the items should be different, each item should have the same angle. Here is what the graph should look like https://echarts.apache.org/examples/en/editor.html?c=pie-roseType-simple&lang=ts&code=PYBwLglsB2AEC8sDeAoWsDOBTAThLGAXLANprrLkWxgCeIWxA5CPkwDRUUZgCGOYAILQA5gBtGsAIwAOAAztYXdFmgATYeMkBmAGwLlsALYRomicT0Hq6HMGwAVepKb8svDobW8-xMjYokWAA3XjEAV0kpOQVYaF4jFwAJMIAzWEEmWABfTgD0INCIyQBWWPjE5hSxdIAhLNzDApCwyOIAJhjFCuS02ABhBsMAXS5s8lHsgG4gA

Environment

No response

Any additional comments?

A workaround is to set minAngle to be some large number like 360 in which case it seems the fixed angle is respected again. This technique was used to get the "expected behavior".

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Feb 21, 2024
@helgasoft
Copy link

helgasoft commented Feb 21, 2024

Both the angles and radiuses of the pie chart's items are different. Only the radius of the items should be different, each item should have the same angle.

Agree. And I'll throw a guess that roseType:'area' is not even implemented. It behaves exactly like roseType:'radius' before being fixed by minAngle. BTW in order to work minAngle needs to be (minAngle >= total angle / total sectors) - Demo Code

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants