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