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