Skip to content

Instantly share code, notes, and snippets.

@gabrielflorit
Forked from anonymous/water.css
Created August 21, 2012 03:49
Show Gist options
  • Save gabrielflorit/3411361 to your computer and use it in GitHub Desktop.
Save gabrielflorit/3411361 to your computer and use it in GitHub Desktop.
created by livecoding - http://livecoding.io/3411361
svg {
position: absolute;
}
var width = $('svg').width();
var height = $('svg').height();
var svg = d3.select('svg');
svg
.attr('width', width)
.attr('height', height);
svg.selectAll('circle')
.data([18])
.enter().append('circle')
.attr('cy', 236)
.attr('cx', String)
.attr('r', Math.sqrt);
svg.selectAll('rect')
.data([200])
.enter().append('rect')
.attr('x', String)
.attr('y', 273.5)
.attr('width', 123)
.attr('height', 123)
.style('fill', 'none')
.style('stroke', '#000000');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment