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] When pie.minAngle is within the normal range but the set value is relatively large, the size of the sector angle does not match the actual value corresponding to each sector, and there is a problem with the sector enlargement effect when hovering over the sector #20621

Open
likexin-kk opened this issue Dec 26, 2024 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@likexin-kk
Copy link

Version

5.5.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQBKOAZjgE5OzB2wCGsA6jgEYBnCGByUANEXQCArnxHkqAMQ4BrHLAAiHMB3GTYuOhViUAxjmgjGlIgF8J6MMGBZIIAqmIZGEAOa-mKmEcAFsbdHsiXADoABMPfWAfC2NKADcmSFMOLD0vQ1SC8NhIqSYIHAECAG19Ty9YaA4Q_BMAQVNzAQFYRUZgMIcGsABPEFbKEAq8hsYOWIhpKpMAVgAGAFIZr1jtDhr9LyRYNJzpVoA2MUbmiYBlHA5GUwALWABRaF8IaFESoYayBOZ1aK2uTRaVA0EGYpjAlH-h2Ix1OWHOBAAjGtwbcqO8QhwILlEYD0CiQZiwTdISYAKrQKBwNqxAQI0qk8lo1rY6kTABqEFiOGAsGZrJKSIAugDiKEQC8OEJlvVAcEQndRrgEqTiAIFbFgAB3ABCaMYmOxSK8evmRoA8nQ6AIcGAABoES06qT6o0AYRcSSojF8fA4AAoeZHrmsAHQrACUxUBtiR7K8IR-bS-WtgWLW-hT6ElKFsAG4gA

Steps to Reproduce

  1. Set a relatively large pie.minAngle.
  2. The values corresponding to each sector should not be similar.
  3. Check the angles of all sector and the corresponding values of each sector area.
  4. Hover all sector and observe the angle change after hovering

Current Behavior

  1. The correspondence between the size of the angle of the sector and the corresponding classification value of the sector is confusing.
  2. When hovering over the ‘Search Engine’ , the angle of the sector increases.

Expected Behavior

  1. The size of the sector angle corresponds to the size of the value.
  2. When hovering over any sector, only the sector will be magnified without changing the angle of the sector area.

If this is not a bug, unless the user is particularly familiar with the pie.minAngle function, it will be difficult to visually see the proportion of each category, which will affect the user experience

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@likexin-kk likexin-kk added the bug label Dec 26, 2024
@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 Dec 26, 2024
@Acacia55
Copy link

Hello. I happened to see your issue and looked at the link you gave.

For your example, I think there are some configuration items that are not very reasonable (there is also a certain possibility that echarts was not designed with 0 in mind).

First, we need to argue that it makes sense to set a minimum angle when the data in the pie chart has a value of 0.From my point of view, if there is an item in the pie chart with a data value of 0, then the minimum angle of the design is redundant, because there is really no need for the value of 0 to be displayed in the pie chart. Of course, this includes what I said about echart, which was not designed with the special value of 0 in mind.

Secondly, for pie charts, the maximum angle is 360 degrees, and if the angle of the minimum value is set to a static value and this static value is too large, there will be problems. For example, if there are five items in a pie chart, it is mathematically wrong to set the minimum item to an angle of 100, because the minimum angle is 100. Then 100*5>360. Therefore, this minimum angle is best calculated dynamically, and if there is a value of 0 in the data, the minimum angle should be avoided.

of course, the echarts official can further modify the rationality of this configuration item, so that you don't have to think about this problem when you use it.

@sz-p
Copy link
Contributor

sz-p commented Dec 27, 2024

#20603

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

3 participants