-
Notifications
You must be signed in to change notification settings - Fork 358
Open
Labels
Description
Description
Summary
When using donut charts with padAngle enabled, internal calculations result in Infinity when all data values are fractional numbers less than 1.
This issue does not occur in v3.15.1, but does occur in v3.17.2, indicating a regression.
Environment
- billboard.js version
- ✅ v3.15.1 → works as expected
- ❌ v3.17.2 → incorrect ratio / rendering
- Browser: Chrome (latest)
- Chart type:
donut - No custom plugins
Steps to check or reproduce
| v3.15.1 | v3.17.2 | |
|---|---|---|
| JS Bin | sample | sample |
| Image | ![]() |
![]() |
Steps to Reproduce
bb.generate({
bindto: "#donutChart",
data: {
type: "donut",
columns: [
["A", 0.42],
["B", 0.28],
["C", 0.28]
]
},
donut: {
padAngle: 0.03
}
});Expected Behavior
- The chart should display valid values that correctly reflect the calculated ratios.
- This is exactly how it behaves in v3.15.1
Actual Behavior (v3.17.2)
- In certain cases, the internal ratio calculation results in invalid values (
Infinity) - The issue disappears immediately if:
padAngleis removed, or- values are scaled (e.g.
42, 28, 28instead of0.42, 0.28, 0.28)

