D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mbostock
Full window
Github gist
Circular Layout (Arc)
<!DOCTYPE html> <meta charset="utf-8"> <body> <script src="//d3js.org/d3.v3.min.js"></script> <script> var radius = d3.scale.linear() .domain([0, 9]) .range([180, 240]); var fill = d3.scale.linear() .domain([0, 9]) .range(["brown", "steelblue"]); var svg = d3.select("body").append("svg") .attr("width", 960) .attr("height", 500) .append("g") .attr("transform", "translate(480,250)"); var g = svg.selectAll("g") .data(d3.range(0, 360, 2)) .enter().append("g") .attr("transform", function(d) { return "rotate(" + d + ")"; }); var path = g.selectAll("path") .data(d3.range(10)) .enter().append("path") .attr("d", d3.svg.arc() .innerRadius(radius) .outerRadius(function(d) { return radius(d) + 9; }) .startAngle(0) .endAngle(Math.PI / 90)) .attr("fill", fill) .attr("stroke", "black"); </script>
https://d3js.org/d3.v3.min.js