#162
Pie charts leave an empty sector when several slices fall below 1%
In Pele 1.13.0, a pie with one 90% category and twenty 0.5% categories draws one 324° wedge. The remaining 36° is blank, even though all 21 categories have positive values and appear in the legend.
This reproduces with the published npm package and its default settings.
import { render } from 'pele';
const rows = [
'"Main": 900',
...Array.from({ length: 20 }, (_, i) => `"Small ${i + 1}": 5`),
];
const { svg } = render(['pie showData', ...rows].join('\n'));
console.log(svg);The renderer computes shares from the full total, then skips the small wedges when advancing the angle. With several small categories the gap becomes visible. The 1% cutoff itself is covered by an existing test. Pie rendering · Pie test
Would you consider an option to draw every positive slice at its actual size while keeping the cutoff for percentage labels? That would fill the circle, keep proportions accurate, and avoid crowding the chart with labels.
Activity
0No activity yet.