Skip to content

Instantly share code, notes, and snippets.

@georules
Last active August 29, 2015 18:49
Show Gist options
  • Save georules/c8b3c4fe99437352bcc5 to your computer and use it in GitHub Desktop.
Save georules/c8b3c4fe99437352bcc5 to your computer and use it in GitHub Desktop.
circles1
{"description":"circles1","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"circles.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":true,"loop":true,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"inline-console":false,"thumbnail":"http://i.imgur.com/9XKtzJo.png"}
var svg = d3.select("svg")
d3.select("body").style("background-color",d3.rgb(47,40,51))
var twoPi = 2 * Math.PI,
gx = 300,
gy = 282,
color = "#eb6a74"
var arc = d3.svg.arc()
.startAngle(0)
.innerRadius(137)
.outerRadius(250)
var meter = svg.append("g")
.attr("transform", "translate(" + [gx, gy] +")")
meter.append("path")
.attr("d", arc.endAngle(twoPi))
.attr("fill","#0800a8")
.attr('stroke','#fff')
.style('stroke-width',"10")
//.style("stroke-linejoin", "round")
anim = tributary.anim(0, twoPi)
var foreground = meter.append("path")
foreground.attr("d", arc.endAngle(2))
.attr('fill',"#0579ff")
.attr('stroke','#fff')
.style('stroke-width',"4.08")
.style("stroke-linejoin", "round")
.style("stroke-lineCap","round")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment