[ Launch: Tributary inlet ] 5018733 by roundrobin
-
-
Save roundrobin/5018733 to your computer and use it in GitHub Desktop.
Grid - Type 1
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
{"description":"Grid - Type 1","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"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/dJTmuUw.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 = g.append('g') | |
.attr('transform','translate('+[128,60]+')') | |
svg.append('rect') | |
.attr('width', 400) | |
.attr('height', 400) | |
.style('fill','#478FF8') | |
var w = 400; | |
var h = 400; | |
var xscale = d3.scale.linear().domain([0, 10]).range([0, w]); | |
var yscale = d3.scale.linear().domain([0, 10]).range([0, h]); | |
var strokeCol = '#FFFFFF'; | |
var range = d3.range(10); | |
var t = svg.selectAll('line') | |
.data(range) | |
.enter() | |
t.append('line') | |
.attr({ | |
stroke: strokeCol, | |
"stroke-width": 1, | |
fill: "none", | |
x1: function(d,i){ return xscale(i);}, | |
x2: function(d,i){ return xscale(i);}, | |
y1: 0, | |
y2: h, | |
'class':'ly' | |
}); | |
var range = d3.range(10); | |
var t = svg.selectAll('line') | |
.data(range) | |
.enter() | |
t.append('line') | |
.attr({ | |
stroke: strokeCol, | |
"stroke-width": 1, | |
fill: "none", | |
x1: function(d,i){ return xscale(i);}, | |
x2: function(d,i){ return 0;}, | |
y1: 0, | |
y2: h, | |
'class':'ly2' | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment