Make dblclick event cancelable. (#840)
[dygraphs.git] / tests / negative.html
... / ...
CommitLineData
1<!DOCTYPE html>
2<html>
3 <head>
4 <link rel="stylesheet" href="../dist/dygraph.css">
5 <title>negatives</title>
6 <script type="text/javascript" src="../dist/dygraph.js"></script>
7
8 </head>
9 <body>
10 <p>All negatives (x-axis on top):</p>
11 <div id="g1" style="width:600px; height:200px;"></div>
12
13 <p>Mixed (x-axis in middle):</p>
14 <div id="g2" style="width:600px; height:200px;"></div>
15
16 <p>All positives (x-axis on bottom):</p>
17 <div id="g3" style="width:600px; height:200px;"></div>
18
19 <script type="text/javascript">
20 var negs = [];
21 var mixed = [];
22 var pos = [];
23 for (var i = 0; i < 100; i++) {
24 negs.push([i, -210 + i, -110 - i]);
25 mixed.push([i, -50 + i, 50 - i]);
26 pos.push([i, 1000 + 2 * i, 1100 + i]);
27 }
28
29 var g1 = new Dygraph(
30 document.getElementById("g1"),
31 negs, { labels: [ 'x', 'y1', 'y2' ] }
32 );
33
34 var g2 = new Dygraph(
35 document.getElementById("g2"),
36 mixed, { labels: [ 'x', 'y1', 'y2' ] }
37 );
38
39 var g3 = new Dygraph(
40 document.getElementById("g3"),
41 pos, { labels: [ 'x', 'y1', 'y2' ] }
42 );
43
44 </script>
45 </body>
46</html>