.DS_Store
# use-d3-v3-to-build-interactive-charts-with-javascript
    body {
      padding-top: 50px;
      padding-left: 100px;
    }

    #chartArea {
      width: 400px;
      height: 300px;
      background-color: #CCC;
    }

    .bar {
      display: inline-block;
       /* Gets overriden by D3-assigned height below */
      margin-right: 2px;
      fill: teal;
    }
<!DOCTYPE html>
<html>
<head>
  <title>D3 - Data Driven Documents</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.js"></script>
  <link rel="stylesheet" href="./app.css">
</head>
<body>
  
<div id="chartArea"></div>
<script src="script.js"></script>
</body>
</html>
  var dataset = [ 5, 10, 15, 20, 25, 46, 36, 24, 36 ];
  var w = 400, h = 300;

  var svg = d3.select('#chartArea').append('svg')
    .attr('width', w)
    .attr('height', h);

  var yScale = d3.scale.linear()
    .domain([0, 50])
    .range([0, h]);

  var multiplier = 5;

  svg.selectAll('rect')
    .data(dataset)
    .enter()
    .append('rect')
    .attr('class', 'bar')
    .attr('x', function (d, i) {
      return i * 22;
    })
    .attr('y', function (d) {
      return h - yScale(d);
    })
    .attr('width', 20)
    .attr('height', function (d) {
      return yScale(d);
    });