D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
35degrees
Full window
Github gist
arcsvghelp
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } </style> </head> <body> <script> var radii = [25,40]; var svg = d3.select("body").append("svg") .attr("width", 960) .attr("height", 500) var circles = svg.selectAll("circle") .data(radii) .enter() .append("circle"); var arc = d3.arc() .outerRadius(radii) .startAngle((Math.random() * 180) * (Math.PI/180)) .endAngle(3); circles.attr("cx", function(d,i){ return (i * 80) + 50; }) .attr("cy", 100) .attr("r", function(d) { return d }) .attr("fill","BlanchedAlmond") .attr("stroke","Red") .append("path") .attr("d",arc) .attr("fill", "red") .attr("transform", "translate(200,200)"); </script> </body>
https://d3js.org/d3.v4.min.js