Skip to content

Instantly share code, notes, and snippets.

@bfleischhacker
Created September 9, 2012 04:53
Show Gist options
  • Save bfleischhacker/3682655 to your computer and use it in GitHub Desktop.
Save bfleischhacker/3682655 to your computer and use it in GitHub Desktop.
{
"libraries": [
"d3"
],
"mode": "javascript",
"layout": "sketchpad mode"
}
#red {
width: 100px;
height: 100px;
background: #FF0000;
}
#blue {
width: 100px;
height: 100px;
background: #0000FF;
}
<div id="viz"></div>
var sampleSVG = d3.select("#viz")
.append("svg")
.attr("width", 300)
.attr("height", 300);
sampleSVG.append("circle")
.style("stroke", "orange")
.style("fill", "green")
.attr("r", 39)
.attr("cx", 42)
.attr("cy", 50)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment