xxxxxxxxxx
<html>
<head>
<title>Bar Example</title>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/d3@2.10.3/d3.v2.js"></script>
<script type="text/javascript" src="data.json"></script>
<script type="text/javascript" src="bar.js"></script>
<style type="text/css">
#demo {
float: left;
}
#vimeo {
padding: 30px;
float: left;
}
</style>
</head>
<body>
<div id="demo">
<div id="buttons">
<button id="data1">Set Data to data 1</button>
<button id="data2">Set Data to data 2</button>
<br>
<button id="random">Make Random Data</button>
<input id="num" value=10></input>
</div>
<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" id="svg"></svg>
</div>
<script type="text/javascript">
init();
</script>
<div id="vimeo">
<iframe src="https://player.vimeo.com/video/33097206?title=0&byline=0&portrait=0" width="500" height="313" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><p><a href="https://vimeo.com/33097206">[dd3] Selections in d3.js with a simple bar chart</a> from <a href="https://vimeo.com/user4640702">Ian Johnson</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
</div>
</body>
</html>
Modified http://mbostock.github.com/d3/d3.js to a secure url
https://mbostock.github.com/d3/d3.js