Pie Padding
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Nov 16, 2014
This example demonstrates a pie chart with small gaps between its slices, created using a hardcoded array of eight numeric values. The `d3.layout.pie` function with a `padAngle` of .02 adds parallel-sided padding between arcs, while approximately preserving their relative areas and angles. An `d3.svg.arc` defines the donut shape, and the chart is rendered as SVG paths, with each slice colored using `d3.scale.category10`.
AI-generated descriptionD3 3.5’s d3.layout.pie supports optional padding between arcs. The sides of adjacent arcs are parallel, and the relative area (and angle) of arcs are approximately preserved.
gpl-3.0 Licensed