| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>negatives</title> |
| 5 | <!-- |
| 6 | For production (minified) code, use: |
| 7 | <script type="text/javascript" src="dygraph-combined.js"></script> |
| 8 | --> |
| 9 | <script type="text/javascript" src="../dygraph-dev.js"></script> |
| 10 | |
| 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 | |
| 32 | var g1 = new Dygraph( |
| 33 | document.getElementById("g1"), |
| 34 | negs, { labels: [ 'x', 'y1', 'y2' ] } |
| 35 | ); |
| 36 | |
| 37 | var g2 = new Dygraph( |
| 38 | document.getElementById("g2"), |
| 39 | mixed, { labels: [ 'x', 'y1', 'y2' ] } |
| 40 | ); |
| 41 | |
| 42 | var g3 = new Dygraph( |
| 43 | document.getElementById("g3"), |
| 44 | pos, { labels: [ 'x', 'y1', 'y2' ] } |
| 45 | ); |
| 46 | |
| 47 | </script> |
| 48 | </body> |
| 49 | </html> |