Public
Edited
Feb 16, 2023
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
arc = d3.arc()
.innerRadius(innerRadius)
.outerRadius(d => outerScale(or(d)))
.startAngle((d,i) => angles(i) - angles.bandwidth()/2)
.endAngle((d,i) => angles(i) + angles.bandwidth()/2)
Insert cell
Insert cell
angles = d3.scaleBand().domain(d3.range(0, directions.length)).range([0, 2*Math.PI])
Insert cell
Insert cell
Insert cell
innerRadius = {
if (directions.length) {
return Math.sqrt((angles.bandwidth() / gamma * outerRadius * outerRadius) / (2 * Math.PI + angles.bandwidth() / gamma));
}
return outerRadius;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more