-
-
Save jfirebaugh/4332323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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