View this code at http://livecoding.io/5796992
Created
June 17, 2013 13:47
-
-
Save daigofuji/5796992 to your computer and use it in GitHub Desktop.
created by http://livecoding.io
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
{ | |
"libraries": [ | |
"d3" | |
], | |
"mode": "javascript", | |
"layout": "fullscreen mode (vertical)", | |
"resolution": "reset" | |
} |
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
/* css goes here */ |
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 goes here --> | |
<div class="chart"></div> |
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
/* javascript goes here */ | |
var dataset =[12, 35, 46, 45, 57, 53, 4, 55, 66, ] | |
// var p = d3.select("body").selectAll("p"); | |
var w = 570; | |
var h = 200; | |
var svg = d3.select(".chart") | |
.append("svg") | |
.attr({width:w, height:h}); | |
svg.selectAll("circle") | |
.data(dataset) | |
.enter() | |
.append("circle") | |
.attr({ | |
cx: function(d,i) {return 50+(i*100); }, | |
cy: h/2, | |
r: function(d) {return d}, | |
fill: "red" | |
}); | |
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
{ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment