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] Optimize the percentage calculation algorithm for pie #3700

Open
xile611 opened this issue Feb 5, 2025 · 1 comment
Open

[Feature] Optimize the percentage calculation algorithm for pie #3700

xile611 opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
low priority This issue may not fit our design or its not common requirement. We may not do this

Comments

@xile611
Copy link
Contributor

xile611 commented Feb 5, 2025

What problem does this feature solve?

Image

Image

优化点:
当最大的数字有多个的时候,尝试寻找只有单个的数字上

What does the proposed API look like?

no new api

@xiaoluoHe xiaoluoHe added the low priority This issue may not fit our design or its not common requirement. We may not do this label Feb 7, 2025
@xiaoluoHe
Copy link
Contributor

“百分比之和为 100“ 和 “相同数值的百分比值一样” 在某些情况下是冲突的。
例如:3个值都为1,且需要百分比标签保留 2 位小数时:

  • “百分比之和为 100“:33.33%、33.33%、33.34%
  • “相同数值的百分比值一样” :33.33%、33.33%、33.33%

目前,vchart 中默认通过最大余额法计算了保留两位小数的百分比值,即优先满足“百分比之和为 100”;

若需要满足后者,目前建议用户自己通过格式化处理。

暂不处理,观察后续是否有类似反馈。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority This issue may not fit our design or its not common requirement. We may not do this
Projects
None yet
Development

No branches or pull requests

2 participants