View this code at http://livecoding.io/5845125
Created
June 23, 2013 14:03
-
-
Save Maxim-Filimonov/5845125 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
div.bar { | |
display: inline-block; | |
width: 20px; | |
height: 75px; | |
background-color: teal; | |
} |
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
<svg></svg> |
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
w = 500; | |
h = 50; | |
svg = d3.select('svg'); | |
var dataset = [ 5, 13, 15, 20, 25 ]; | |
var circles = svg.selectAll("circle") | |
.data(dataset) | |
.enter() | |
.append("circle"); | |
circles | |
.attr('cx', function(d, i) { | |
return (i * 59) + 25; | |
}) | |
.attr('cy', h/1.3) | |
.attr('r', function(d) { return d;}) | |
.attr('fill', 'yellow') | |
.attr('stroke', 'red') | |
.attr('stroke-width', function(d) { return d/3.9}) |
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