Open kylekarpack opened 2 months ago
The proposed solution is to use a light gray (gray-200 or similar) ring as the donut and to display the value in the center as 0. Also we will drop all direct labels.
@marshallpete @kylekarpack I am willing to work on this issue!
@Sid-80 sounds good. Please review the Contribution Guidelines and the Developer Docs before you get started.
Provide a general summary of the issue here
When rendering segment labels on a donut chart, there are several issues if all segments have a value of
0
.๐ค Expected Behavior?
NaN
s displayed๐ฏ Current Behavior
Several rendering problems with the chart:
๐ Possible Solution
Falling back to a "No data found" label would be fine:![image](https://github.com/adobe/react-spectrum-charts/assets/2429580/d6bc386c-0d32-4479-b6c4-2f2663d38be0)
Alternatively, an empty donut chart would work nicely:![image](https://github.com/adobe/react-spectrum-charts/assets/2429580/dcdf9b99-ac7a-432d-9be4-1b83da1bf6bb)
๐ฆ Context
No response
๐ฅ๏ธ Steps to Reproduce
Visit the CodeSandbox here
Ensure that all data points have a value of 0, and show percentage and value labels on a donut chart:
Version
1.11.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS
๐งข Your Company/Team
AJO B2B
๐ท Tracking Issue
No response