Skip to main content
100%

Arc Padding II

✓ Published0🌍 Public
SSmith5mr
Last edited Feb 4, 2016
Created on Feb 4, 2016

This example shows a donut chart built from seven proportional arcs, each filled with a semi-transparent color and outlined with a darker stroke. It demonstrates the `padAngle` method of `d3.arc` in D3 v4, which adds a fixed angular gap between adjacent arcs. The data values are the Fibonacci sequence [1, 1, 2, 3, 5, 8, 13], processed by `d3.pie` to compute start and end angles. Rendering happens on a Canvas 2D context, with `context.fill` and `context.stroke` applying the color and outline for each path generated by the arc generator.

AI-generated description

A demonstration of arc.padAngle.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/f37b07b92633781a46f7'>Arc Padding II</a>

Similar vizzes