A very, very simple modular chart based on [Mike Bostock's recommendation](// A very, very simple D3 modular chart based on http://bost.ocks.org/mike/chart/)
Creates a new chart type "histobar" that when insantiated, renders the data as a string in an SVG. Obviously not useful in itself, but the simplest possible reusable chart as a place to start.
xxxxxxxxxx
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
background-color: #eef;
}
svg { background-color: #fee; }
text { font: 10px sans-serif; }
</style>
<body>
<h1>Histogam bar demo</h1>
<div id="chartArea"></div>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="histobar.js"></script>
<script>
var data = [1, 1, 2, 3, 5, 8];
var chart = histobar();
d3.selectAll("#chartArea").data([data]).call(chart);
</script>
</body>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js