[ Launch: for CryptoQuick ] 6181384 by enjalot
-
-
Save enjalot/6181384 to your computer and use it in GitHub Desktop.
for CryptoQuick
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":"for CryptoQuick","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/zG7EG7E.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 width = 960, | |
height = 500; | |
var color = d3.scale.linear() | |
.range(['#aad', '#556']); | |
var data0 = [ | |
[100, 100], | |
[150, 75], | |
[200, 100], | |
[200, 150], | |
[150, 175], | |
[100, 150] | |
]; | |
var data1 = [ | |
[300, 300], | |
[350, 275], | |
[400, 300], | |
[400, 350], | |
[350, 375], | |
[300, 350] | |
]; | |
var line = d3.svg.line() | |
.x(function(d) { return d[0] }) | |
.y(function(d) { return d[1] }) | |
.interpolate('linear-closed') | |
var svg = d3.select('svg') | |
.attr('width', width) | |
.attr('height', height); | |
svg. | |
selectAll('path.area') | |
.data([data0, data1]) | |
.enter().append('path') | |
.style({ | |
fill: function() { return color(0.5); }, | |
stroke: '#909', | |
'stroke-width': 5 | |
}) | |
.attr('class', 'area') | |
.attr('d', function(d) { | |
return line(d) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment