[ Launch: Experiment ] 9b9f338271b8d522fb34c9cff32125b5 by RobinL
-
-
Save RobinL/9b9f338271b8d522fb34c9cff32125b5 to your computer and use it in GitHub Desktop.
Experiment
This file contains hidden or 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":"Experiment","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true} |
This file contains hidden or 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
my_array = d3.range(16) | |
var svg = d3.select("svg") | |
svg.selectAll(".my_rectangles") | |
.data(my_array) | |
.enter() | |
.append("rect") | |
.attr({ | |
width: 10, | |
height: 130, | |
x: function(d) {return 10+ d*20}, | |
y: function(d) {return 50+ Math.sin(d/3) * 100}, | |
fill: "#3BA360" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment