[ Launch: CSV test ] 5ebc55eda179fb16195d by enjalot
[ Launch: SVG text test ] cb49cfd57f6a5a0a9c18 by gauthi24
[ Launch: test ] 5c86b21df66099320fc5 by gauthi24
[ Launch: test ] 4653053 by enjalot
[ Launch: test ] 4652017 by enjalot
[ Launch: test ] 4582399 by enjalot
-
-
Save enjalot/5ebc55eda179fb16195d to your computer and use it in GitHub Desktop.
CSV test
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":"CSV test","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},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12},"dataset.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"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,"tab":"edit","display_percent":0.7,"thumbnail":"http://i.imgur.com/h40JYzO.png","fullscreen":false,"ajax-caching":true} |
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
age | weight | |
---|---|---|
1 | 15 | |
1 | 20 | |
2 | 30 | |
2 | 28 | |
3 | 39 |
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 w = 400; | |
var h = 300; | |
var padding = 2; | |
var playData = [17,10,15,20,25]; | |
var realData; //global variable for dataset | |
var svg = d3.select("svg") | |
.attr("width", w) | |
.attr("height", h) | |
.style("background-color", "#ffffff"); | |
playData = tributary.dataset | |
console.log(tributary.dataset) | |
svg.selectAll("rect") | |
.data(playData) | |
.enter() | |
.append("rect") | |
.attr({ | |
x:function(d,i){ | |
return (i*(w/playData.length)); | |
}, | |
y:0, | |
width:function(d){ | |
return(w/playData.length - (playData.length-1)*padding); | |
}, | |
height:function(d){ | |
return (+d.weight)*4; | |
} | |
}); | |
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
text { | |
font-family: sans-serif; | |
font-size: 18px; | |
} | |
text.lables { | |
font-size: 12px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment