[ Launch: Tributary inlet ] 5608169 by nachocab
-
-
Save nachocab/5608169 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
{"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"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} |
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 margin = {top: 200, right: 10, bottom: 200, left: 10}, | |
width = 960 - margin.right - margin.left, | |
height = 500 - margin.top - margin.bottom; | |
var x = d3.scale.linear() | |
.domain([.05, .95]) | |
.range([0, width]); | |
var y = d3.scale.linear() | |
.range([0, height]); | |
var svg = d3.select("svg") | |
.attr("width", width + margin.right + margin.left) | |
.attr("height", height + margin.top + margin.bottom) | |
.append("g") | |
.attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
svg.append("rect") | |
.attr("width", width) | |
.attr("height", height); | |
svg.append("g") | |
.attr("class", "x grid") | |
.attr("transform", "translate(0," + height + ")") | |
.call(d3.svg.axis().scale(x).tickSubdivide(1).tickSize(-height)); | |
svg.append("g") | |
.attr("class", "x axis") | |
.attr("transform", "translate(0," + height + ")") | |
.call(d3.svg.axis().scale(x)); |
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
body { | |
font: 10px sans-serif; | |
} | |
rect { | |
fill: #ddd; | |
} | |
.grid line { | |
stroke: #fff; | |
} | |
.grid line.minor { | |
stroke-width: .5px; | |
} | |
.grid text { | |
display: none; | |
} | |
.axis line { | |
stroke: #000; | |
} | |
path { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment