Created
September 18, 2011 17:36
-
-
Save jonfrost/1225313 to your computer and use it in GitHub Desktop.
SVG Open ~ D3 Workshop ~ Example 01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>D3 Example 1 ~ SVG Open</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<style type="text/css"> | |
body { | |
background: #aaa; | |
} | |
ellipse { | |
stroke: steelblue; | |
stroke-width: 2.5; | |
fill: #ddd; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="vis" style="width:100%;height:100%;"></div> | |
<script type="text/javascript"> | |
var svg = d3.select("#vis").append("svg:svg") | |
.attr("width", 400) | |
.attr("height", 300); | |
svg.append("svg:ellipse") | |
.attr("cx", 100) | |
.attr("cy", 100) | |
.attr("rx", 70) | |
.attr("ry", 90); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment