### Example03 - Binding data
Built with blockbuilder.org
forked from jjelosua's block: d3intro_ex03
forked from jjelosua's block: d3intro_exercise_selection
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Intro D3js examples</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
.existing {color: blue;}
.new {color: green;}
</style>
</head>
<body>
<h1>Intro D3js - ejercicio selección</h1>
<p>initial paragraph</p>
// D3 graphic
<div id="wrapper">
</div>
<p>final paragraph</p>
<script type="text/javascript">
//3 available data points
var data = [5,10,20];
//bind data with DOM elements
var selection = d3.select("body").selectAll("p").data(data);
selection.enter().append("p").attr("class", "new").text(function(d,i) { return d})
</script>
</body>
</html>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js