Skip to content

Instantly share code, notes, and snippets.

@dmann99
Created April 8, 2014 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmann99/10144570 to your computer and use it in GitHub Desktop.
Save dmann99/10144570 to your computer and use it in GitHub Desktop.
Simple D3 Example
{"description":"Simple D3 Example","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"index.html":{"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}},"fullscreen":false,"play":false,"loop":false,"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}
var sampleSVG = d3.select("svg");
sampleSVG.append("circle")
.style("stroke", "gray")
.style("fill", "gray")
.attr("r", 40)
.attr("cx", 50)
.attr("cy", 50)
.on("mouseover", function(){d3.select(this).style("fill", "blue");})
.on("mouseout", function(){d3.select(this).style("fill", "gray");});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment