Skip to content

Instantly share code, notes, and snippets.

@seliopou
Created Mar 21, 2015
Embed
What would you like to do?
work box
{"description":"work box","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"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/7wwY4wq.png"}
var work = d3.svg.area()
.y0(function (d) { return d[2]; });
var svg = d3.select('svg');
svg.append('path')
.attr('d', work([[0, 0, 60], [60, 0, 60]]))
.style('fill', 'grey')
.transition()
.duration(500)
.attr('d', work([[0, 0, 60], [60, 20, 40]]))
.transition()
.duration(500)
.attr('d', work([[100, 20, 40], [140, 20, 40]]))
/*
svg.append('rect')
.attr('y', 20)
.attr('width', 100)
.attr('height', 69)
.style('fill', 'grey')
.transition()
.attr('x', 100)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment