33 lines
666 B
HTML
33 lines
666 B
HTML
<!doctype>
|
|
|
|
<link type="text/css" rel="stylesheet" href="../src/css/graph.css">
|
|
<link type="text/css" rel="stylesheet" href="css/lines.css">
|
|
|
|
<script src="../vendor/d3.v3.js"></script>
|
|
|
|
<script src="../rickshaw.js"></script>
|
|
|
|
<div id="chart"></div>
|
|
|
|
<script>
|
|
|
|
var graph = new Rickshaw.Graph({
|
|
unstack: true,
|
|
element: document.querySelector("#chart"),
|
|
width: 580,
|
|
height: 250,
|
|
min: 'auto',
|
|
renderer: 'bar',
|
|
series: [ {
|
|
color: 'steelblue',
|
|
data: [ { x: 0, y: 20 }, { x: 1, y: 3 }, { x: 2, y: 15 }, { x: 3, y: 42 } ]
|
|
}, {
|
|
color: 'tomato',
|
|
data: [ { x: 0, y: 12 }, { x: 1, y: -20 }, { x: 2, y: 18 }, { x: 3, y: 8 } ]
|
|
} ]
|
|
});
|
|
|
|
graph.render();
|
|
|
|
</script>
|