Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Forked from tmcw/index.html
Created December 18, 2012 21:44
Show Gist options
  • Save jfirebaugh/4332323 to your computer and use it in GitHub Desktop.
Save jfirebaugh/4332323 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
body {
font:normal 14px/20px 'Georgia', serif;
}
</style>
</head>
<body>
<div id='container'>
<h1>Something about d3 I did not understand</h1>
</div>
<script src='http://d3js.org/d3.v3.min.js'></script>
<script>
var ol = d3.select('#container')
.selectAll('ol')
.data(['hello'])
.enter()
.append('ol');
var abc = ol.selectAll('li')
.data(['a', 'b', 'c'])
.enter()
.append('li')
.text(String)
.attr('class', String);
alert(ol.select('li.c').datum());
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment