Example of a stacked bar chart that can be divided into multiples. All credits for this go to Mike Bostock.
xxxxxxxxxx
<html lang=en>
<head>
<meta charset=utf-8>
<title>Multiples Barchart</title>
<link type="text/css" rel="stylesheet" href="style.css"/>
</head>
<body>
<form>
<label><input type="radio" name="mode" value="multiples" checked> Multiples</label>
<label><input type="radio" name="mode" value="stacked"> Stacked</label>
</form>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="colorbrewer.min.js"></script>
<script src="script.js"></script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js