This is the pie chart section of the gallery. The pie chart is highly criticized in dataviz for meaningful reasons. You should read more about that before making one.If you're sure about what you're doing, learn how to build one with d3.js using the examples below.
It is of interest to note that pie chart and donut chart are built using exactly the same process in d3.js. Thus, you probably want to visit the donut section for more examplesDonut chart section
Building a pie chart in d3.js always start by using the
d3.pie() function. This function transform the
value of each group to a radius that will be displayed
on the chart. This radius is then provided to the
d3.arc() function that draws on
arc per group.
How to use the centroid() function to add labels at the right position of each slice.
A selection of examples showing the application of the basic concept to real life dataset.