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