File: lineplot.html

package info (click to toggle)
rickshaw 1.5.1.dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,864 kB
  • sloc: javascript: 15,281; makefile: 97; perl: 59
file content (34 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<link type="text/css" rel="stylesheet" href="../rickshaw.css">

<script src="../vendor/d3.v3.js"></script>

<script src="../rickshaw.js"></script>

<div id="chart"></div>

<script>

var graph = new Rickshaw.Graph( {
	width: 500,
	element: document.getElementById("chart"),
	renderer: 'lineplot',
	padding: { top: 0.1 },
	series: [
		{
			data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ],
			color: 'steelblue',
			name: "blue",
		}, {
			data: [ { x: 0, y: 19 }, { x: 1, y: 22 }, { x: 2, y: 32 }, { x: 3, y: 20 }, { x: 4, y: 21 } ],
			color: 'lightblue',
			name: "light blue"
		}
	]
} );

var hover = new Rickshaw.Graph.HoverDetail({ graph: graph });

graph.render();

</script>