[ Launch: Tributary inlet ] 6236061 by msurguy
No parent Inlet
-
-
Save msurguy/6236061 to your computer and use it in GitHub Desktop.
Tributary inlet
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
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":571,"height":574,"hide":false},"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.svg":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/NyIN5DA.png"} |
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
var svg = d3.select("svg"); | |
var data = [ 42, 13, 69 ]; | |
var groups = svg.selectAll("g") | |
.data(data) | |
.enter() | |
.append("g"); | |
groups.attr("transform", function(d,i) { | |
var x = 78 * i + 100; | |
var y = 41 * i + 100; | |
return "translate(" + [ x, y] + ")"; | |
}) | |
var circles = groups.append("circle") | |
.attr({ | |
cx: function(d,i) { | |
return 0; | |
//return i * 40 + 172; | |
}, | |
cy: function(d,i) { | |
return 0; | |
//return i * 30 + 160; | |
}, | |
r: 20, | |
fill: "#BDBABA", | |
stroke: "#000000", | |
"stroke-width": 3 | |
}) | |
var label = groups.append("text") | |
.text(function(d) { | |
return d; | |
}) | |
.attr({ | |
"alignment-baseline": "middle", | |
"text-anchor": "middle" | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment