x1) - x(d.x0) -1 ; })
          .attr("height", function(d) { return height - y(d.length); })
          .style("fill", "#69b3a2")

    }


  // Initialize with 20 bins
  update(20)


  // Listen to the button -> update if user change it
  d3.select("#nBin").on("input", function() {
    update(+this.value);
  });

});
</script></xmp></code></pre>
            <!-- ==================================== -->
          </div>
        </div>
      </div>
    </section>
    <br />

    <!-- =========================