Skip to content

Instantly share code, notes, and snippets.

@hironow
Last active August 29, 2015 14:28
Show Gist options
  • Save hironow/4f4683093e415cb60176 to your computer and use it in GitHub Desktop.
Save hironow/4f4683093e415cb60176 to your computer and use it in GitHub Desktop.
D3 Test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
rect {
fill: #333;
}
</style>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script>
var svg = d3.select('body').append('svg')
.attr('width', 500)
.attr('height', 500);
var svg.select(this).selctAll('rect')
.data([1, 2, 3])
.enter().append('rect');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment