Debian Codegraph @

examples/lineplot.html

raw
1 <!doctype html>
2 <link type="text/css" rel="stylesheet" href="../rickshaw.css">
3
4 <script src="../vendor/d3.v3.js"></script>
5
6 <script src="../rickshaw.js"></script>
7
8 <div id="chart"></div>
9
10 <script>
11
12 var graph = new Rickshaw.Graph( {
13 width: 500,
14 element: document.getElementById("chart"),
15 renderer: 'lineplot',
16 padding: { top: 0.1 },
17 series: [
18 {
19 data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ],
20 color: 'steelblue',
21 name: "blue",
22 }, {
23 data: [ { x: 0, y: 19 }, { x: 1, y: 22 }, { x: 2, y: 32 }, { x: 3, y: 20 }, { x: 4, y: 21 } ],
24 color: 'lightblue',
25 name: "light blue"
26 }
27 ]
28 } );
29
30 var hover = new Rickshaw.Graph.HoverDetail({ graph: graph });
31
32 graph.render();
33
34 </script>