Add axis_labels tests that rely on the preferred style of formatting axes.
[dygraphs.git] / tests / negative.html
CommitLineData
54425b14 1<!DOCTYPE html>
c19ef1f4
DV
2<html>
3 <head>
10494b48 4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
c19ef1f4
DV
5 <title>negatives</title>
6 <!--[if IE]>
a2b2c3a1 7 <script type="text/javascript" src="../excanvas.js"></script>
c19ef1f4 8 <![endif]-->
7e5ddc94
DV
9 <!--
10 For production (minified) code, use:
11 <script type="text/javascript" src="dygraph-combined.js"></script>
12 -->
13 <script type="text/javascript" src="../dygraph-dev.js"></script>
14
c19ef1f4
DV
15 </head>
16 <body>
17 <p>All negatives (x-axis on top):</p>
18 <div id="g1" style="width:600px; height:200px;"></div>
19
20 <p>Mixed (x-axis in middle):</p>
21 <div id="g2" style="width:600px; height:200px;"></div>
22
23 <p>All positives (x-axis on bottom):</p>
24 <div id="g3" style="width:600px; height:200px;"></div>
25
26 <script type="text/javascript">
27 var negs = [];
28 var mixed = [];
29 var pos = [];
30 for (var i = 0; i < 100; i++) {
31 negs.push([i, -210 + i, -110 - i]);
32 mixed.push([i, -50 + i, 50 - i]);
33 pos.push([i, 1000 + 2 * i, 1100 + i]);
34 }
35
f6fbf9e0 36 var g1 = new Dygraph(
c19ef1f4
DV
37 document.getElementById("g1"),
38 negs, { labels: [ 'x', 'y1', 'y2' ] }
39 );
40
f6fbf9e0 41 var g2 = new Dygraph(
c19ef1f4
DV
42 document.getElementById("g2"),
43 mixed, { labels: [ 'x', 'y1', 'y2' ] }
44 );
45
f6fbf9e0 46 var g3 = new Dygraph(
c19ef1f4
DV
47 document.getElementById("g3"),
48 pos, { labels: [ 'x', 'y1', 'y2' ] }
49 );
50
51 </script>
52 </body>
53</html>