Skip to content

Instantly share code, notes, and snippets.

@ariellindo
Last active August 29, 2015 14:16
Show Gist options
  • Save ariellindo/0ab48a4222379dde9595 to your computer and use it in GitHub Desktop.
Save ariellindo/0ab48a4222379dde9595 to your computer and use it in GitHub Desktop.
var vis = d3.select("body").append("svg")
var pi = Math.PI;
var arc = d3.svg.arc()
.innerRadius(50)
.outerRadius(70)
.startAngle(-90 * (pi/180)) //converting from degs to radians
.endAngle(90 * (pi/180)) //just radians
vis.attr("width", "400").attr("height", "400") // Added height and width so arc is visible
.append("path")
.attr("d", arc)
.attr("fill", "red")
.attr("transform", "translate(200,200)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment