padAngle() represents angular padding between adjacent pie or donut slices. In an arc generator, it accepts a padding angle in radians and leaves visible space between arcs. section 4.4.2 section 4.5
Use padAngle() with these practical rules:
- Chain it while configuring d3.arc(), alongside innerRadius(), outerRadius(), and optionally cornerRadius(). section 4.4.2
- Pass the value in radians; 0.02 radians produces slightly more than one degree of padding. section 4.4.2
- Keep slice angles separate from padding when manually supplying startAngle and endAngle to the arc generator. section 4.4.2
- Expect pie-layout output to include padAngle metadata alongside each slice’s value, index, and angular bounds. section 5.1.2
const arcGenerator = d3.arc() .innerRadius(80) .outerRadius(120) .padAngle(0.02) .cornerRadius(6);
Configure an arc generator with radial dimensions, angular padding, and rounded corners before generating SVG path data. section 4.4.2
