Development version of Piper.js showing how to build multiple charts sharing modules.
xxxxxxxxxx
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="piper.js"></script>
<style>
.domain{
fill: none;
}
.shape{
fill: skyblue
}
line{
stroke: #eee;
}
</style>
</head>
<body>
<div class="container"></div>
<script>
var config = {
container: document.querySelector('.container'),
width: 400,
height: 300,
margin: {top: 40, right: 40, bottom: 60, left: 40},
data: [1, 3, 4]
};
var chart = piper.lineChart(config);
</script>
</body>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js