This post describes how to build a very basic circular barplot with d3.js. You can see many other examples in the circular barplot section of the gallery. Learn more about this type of chart in data-to-viz.com. This example works with d3.js v4
and v6
scaleBand
as for a normal barplot. However then range usually goes between 0 and 2Pi for a complete circle.scaleRadial()
function. A scaleLinear()
would work as well, but would visually inflate the importance of high values as explained here and here.path
and not a rect
. The d3.arc()
is a life saver here, learn more about how it works here.