-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Pie chart offset not equal #10286
Comments
Can't seem to reproduce it, please add a reproducable sample as required by the issue template |
Here is the test case, as you can see the offsets are not equal. |
The offset is implemented as follows:
This implementation means that the space between arcs is not constant, nor is it designed to be. I'm not sure what to do here, but it seems like the |
How do I implement equal spacing between the arcs, can you show an example please? |
@etimberg Is there any way to achieve that now? |
Hi @etimberg, |
I was able to achieve something similar to equal spacing (works better for thinner doughnuts) by interlacing data values with the some fixed 'space' value ( Note that if you are using tooltips or labels you will have to make sure you don't show these for spacing arcs (tooltips are handled in the example). |
looks like this issue is still open. |
+1 Really would like a fix to this, seems like a no-brainer... @spaghettiguru's solution works but is certainly a workaround to an issue. To add to their solution though, you can dynamically interlace 1 and 'transparent' using: |
Expected behavior
Offset should be equal in all.
Current behavior
Pie chart offset between the slices is not equal, as shown in the image.
Please tell how to resolve this.
Reproducible sample
None
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v3.7.1
Browser name and version
No response
Link to your project
No response
The text was updated successfully, but these errors were encountered: