Using an arc generator
Among the most common shape generators-besides the line and area generator-D3 also provides the arc generator. At this point, you might be wondering, Didn't SVG standard already include circle element? Isn't that enough?
The simple answer to this is no. The D3 arc generator is a lot more versatile than the simple
svg:circle element. The D3 arc generator is capable of creating not only circles but also annulus (donut), circular sector, and annulus sector, all of which we will learn in this recipe. More importantly, an arc generator is designed to generate, as its name suggests, an arc (in others words, not a full circle or even a sector but rather arcs of arbitrary angle).
Open your local copy of the following ...