Skip to content

Instantly share code, notes, and snippets.

@RobinL
Created March 21, 2013 18:55
Show Gist options
  • Save RobinL/5215654 to your computer and use it in GitHub Desktop.
Save RobinL/5215654 to your computer and use it in GitHub Desktop.
No fill
{"description":"No fill","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01}
d3.select("body").style("background-color", "black");
var sampleSVG = d3.select("svg")
.append("svg")
.attr("width", 400)
.attr("height", 200);
sampleSVG.append("circle")
.style("fill", "grey")
.style("stroke-width", 2)
.attr("r", 60)
.attr("cx", 150)
.attr("cy", 100)
.on("mouseover", function(){d3.select(this).style("fill", "red");})
.on("mouseout", function(){d3.select(this).style("fill", "grey");});
sampleSVG.append("circle")
.style("stroke", "yellow")
.attr("fill","none")
.style("stroke-width", 2)
.attr("r", 100)
.attr("cx", 250)
.attr("cy", 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment