[ Launch: Tributary inlet ] b2e192a423c1be3e0761 by ramnathv
-
-
Save ramnathv/b2e192a423c1be3e0761 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},"_.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":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/ztX6Dg8.gif"} |
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 = d3.select("svg") | |
.attr("width", 800) | |
.attr("height", 600) | |
var data = [30, 60, 90], | |
r = 200 | |
var group = svg.append("g") | |
.attr("transform", "translate(300, 300)") | |
var colors = d3.scale.category20() | |
var arc = d3.svg.arc() | |
.innerRadius(100) | |
.outerRadius(200) | |
var pie = d3.layout.pie() | |
.value(function(d){return d}) | |
var arcs = group.selectAll(".arc") | |
.data(pie(data)).enter() | |
.append("g") | |
.attr("class", "arc") | |
arcs.append("path") | |
.attr("d", arc) | |
.attr("fill", function(d, i){return colors(i)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment