Last active
August 29, 2015 14:23
-
-
Save mayhewsw/2570119e161dc6247503 to your computer and use it in GitHub Desktop.
D3 Test
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
<html> | |
<head> | |
<title>Put stuff here</title> | |
</head> | |
<body> | |
<h2>This is my block/gist!</h2> | |
<div id="putstuffhere"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
<script> | |
var svg = d3.select("#putstuffhere").append("svg") | |
.attr("width", 500) | |
.attr("height", 300); | |
var data = [3, 5, 1, 3, 9, 10]; | |
var circles = svg.selectAll("myrects") | |
.data(data).enter().append("circle") | |
.attr("r", function(d) {return d}) | |
.attr("x", function(d) {return d}) | |
.attr("y", function(d) {return d}) | |
.attr("fill", "blue"); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment