D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mbostock
Full window
Github gist
Banded Arcs
<!DOCTYPE html> <meta charset="utf-8"> <style> path { fill: lightsteelblue; stroke: steelblue; } </style> <body> <script src="//d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500; var data = d3.range(20); var angle = d3.scale.ordinal() .domain(data) .rangeBands([0, 2 * Math.PI]); d3.select("body").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")") .selectAll("path") .data(data) .enter().append("path") .attr("d", d3.svg.arc() .innerRadius(height / 2 - 20) .outerRadius(height / 2 - 10) .startAngle(function(d) { return angle(d); }) .endAngle(function(d) { return angle(d) + angle.rangeBand() / 2; })); </script>
https://d3js.org/d3.v3.min.js