Skip to content

Corrected spacing in pie/doughnut/polarArea (Fixes #10059)#12238

Open
danielgindi wants to merge 4 commits intochartjs:masterfrom
danielgindi:bug_10059
Open

Corrected spacing in pie/doughnut/polarArea (Fixes #10059)#12238
danielgindi wants to merge 4 commits intochartjs:masterfrom
danielgindi:bug_10059

Conversation

@danielgindi
Copy link
Copy Markdown
Contributor

@danielgindi danielgindi commented Apr 15, 2026

This is a long standing bug, that really bugged me. Now it's fixed, and there's a new spacingMode option to support it and the old behavior. Choose between angular, proportional and parallel. You most likely want parallel.

For full pie charts or polarArea - parallel spacing means that the center dot for each arc has to move a little, as you cannot space it on the center... So for some charts this may look weird. Hence the selection between modes.

proportional is the default method for polarArea which does not change the existing behavior - spacing is calculated based on the size of the arc, to look good enough on the chart.
angular is now the default method for doughnuts and pies - fixing the old bug of different spacing for each slice, but still having an angle there.
parallel is the completely flat spacing - with automatically adjusting innerRadius if needed.

This closes #10059.

@etimberg etimberg requested a review from LeeLenaleee April 15, 2026 21:33
@etimberg etimberg added this to the Version 4.6.0 milestone Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Doughnut Arc Spacing

2 participants