Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (39 sloc) 1.17 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css">
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title></title>
</head>
<body>
<div id="body">
<div id="header">
Example:
<pre class="prettyprint">
d3.json(
"data.json"
function(json){
d3.select
}
)
</pre>
</div>
<div id="chart">
</div>
<script>
d3.json(
"data.json",
function(json){
console.log(json)
d3.select("chart")
.append("ul")
.selectAll("li")
.data(json)
.append("li")
.attr("text", function(d){d.foo})
}
)
</script>
</div>
</body>
</html>