.DS_Store
# use-d3-v3-to-build-interactive-charts-with-javascript
<!DOCTYPE html>
<html>
<head>
<title>D3 - Data Driven Documents</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.js" charset="utf-8"></script>
<style type="text/css">
body
{
padding-top: 50px;
padding-left: 100px;
}
.bar
{
display: inline-block;
width: 20px;
height: 75px; /* Gets overriden by D3-assigned height below */
margin-right: 2px;
background-color: teal;
}
</style>
</head>
<body>
<script src="script.js"></script>
<link rel=“stylesheet” href=“app.css”>
</body>
</html>
var dataset = [ 5, 10, 15, 20, 25, 40 ];
d3.select('body').selectAll('div')
.data(dataset)
.enter()
.append('div')
.attr('class', 'bar')
.style('height', function (d) {
return d * 5 + 'px';
});