| 1 |
<!doctype> |
| 2 |
|
| 3 |
<link type="text/css" rel="stylesheet" href="../src/css/graph.css"> |
| 4 |
<link type="text/css" rel="stylesheet" href="css/lines.css"> |
| 5 |
|
| 6 |
<script src="../vendor/d3.v3.js"></script> |
| 7 |
|
| 8 |
<script src="../rickshaw.js"></script> |
| 9 |
|
| 10 |
<div id="chart"></div> |
| 11 |
|
| 12 |
<script> |
| 13 |
|
| 14 |
var graph = new Rickshaw.Graph({ |
| 15 |
unstack: true, |
| 16 |
element: document.querySelector("#chart"), |
| 17 |
width: 580, |
| 18 |
height: 250, |
| 19 |
min: 'auto', |
| 20 |
renderer: 'bar', |
| 21 |
series: [ { |
| 22 |
color: 'steelblue', |
| 23 |
data: [ { x: 0, y: 20 }, { x: 1, y: 3 }, { x: 2, y: 15 }, { x: 3, y: 42 } ] |
| 24 |
}, { |
| 25 |
color: 'tomato', |
| 26 |
data: [ { x: 0, y: 12 }, { x: 1, y: -20 }, { x: 2, y: 18 }, { x: 3, y: 8 } ] |
| 27 |
} ] |
| 28 |
}); |
| 29 |
|
| 30 |
graph.render(); |
| 31 |
|
| 32 |
</script> |