| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
| 5 | <title>negatives</title> |
| 6 | <!--[if IE]> |
| 7 | <script type="text/javascript" src="../excanvas.js"></script> |
| 8 | <![endif]--> |
| 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 | |
| 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 | |
| 36 | var g1 = new Dygraph( |
| 37 | document.getElementById("g1"), |
| 38 | negs, { labels: [ 'x', 'y1', 'y2' ] } |
| 39 | ); |
| 40 | |
| 41 | var g2 = new Dygraph( |
| 42 | document.getElementById("g2"), |
| 43 | mixed, { labels: [ 'x', 'y1', 'y2' ] } |
| 44 | ); |
| 45 | |
| 46 | var g3 = new Dygraph( |
| 47 | document.getElementById("g3"), |
| 48 | pos, { labels: [ 'x', 'y1', 'y2' ] } |
| 49 | ); |
| 50 | |
| 51 | </script> |
| 52 | </body> |
| 53 | </html> |