| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>spacing</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="../dist/dygraph.js"></script> |
| 10 | |
| 11 | <script type="text/javascript" src="data.js"></script> |
| 12 | </head> |
| 13 | <body> |
| 14 | <p>Wide</p> |
| 15 | <div id="div_g" style="width:800px; height:300px;"></div> |
| 16 | |
| 17 | <p>Narrow</p> |
| 18 | <div id="div_g2" style="width:300px; height:200px;"></div> |
| 19 | |
| 20 | <script type="text/javascript"> |
| 21 | g = new Dygraph( |
| 22 | document.getElementById("div_g"), |
| 23 | data, { |
| 24 | rollPeriod: 7, |
| 25 | axes: { |
| 26 | y: { |
| 27 | pixelsPerLabel: 20 |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 | ); |
| 32 | g2 = new Dygraph( |
| 33 | document.getElementById("div_g2"), |
| 34 | data, { |
| 35 | rollPeriod: 7, |
| 36 | axes: { |
| 37 | y: { |
| 38 | pixelsPerLabel: 20 |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | ); |
| 43 | </script> |
| 44 | </body> |
| 45 | </html> |