D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
erikhazzard
Full window
Github gist
data yoga 1
hello markdown
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> </head> <body> <svg width=960 height=500 > </svg> <script> var svg = d3.select('svg'); var rect = svg.append('rect') .attr({ x: 0, y: 0, width: 960, height: 300 }) .style({ fill: "#336699" }); function breathe(){ rect.transition().duration(1200).attr({ transform: 'scale(' + Math.random() + ')' }).each('end', breathe); } breathe(); </script> </body>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js