Commit | Line | Data |
---|---|---|
ccd9d7c2 PF |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> | |
5 | <title>Temperatures with Range Selector</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 | <script type="text/javascript" src="data.js"></script> | |
16 | <style type="text/css"> | |
17 | #bordered { | |
18 | border: 1px solid red; | |
19 | } | |
20 | </style> | |
21 | </head> | |
22 | <body> | |
23 | <p>Demo of a graph with the range selector.</p> | |
24 | <p> | |
25 | No roll period. | |
26 | </p> | |
27 | <div id="noroll" style="width:800px; height:320px;"></div> | |
28 | <p> | |
29 | Roll period of 14 timesteps, custom range selector height and plot color. | |
30 | </p> | |
31 | <div id="roll14" style="width:800px; height:320px;"></div> | |
28dde896 DE |
32 | <p> |
33 | Demo of range selecor without the chart. (interesting if multiple charts should be synced with one range selector). | |
34 | </p> | |
35 | <div id="nochart" style="width:800px; height:30px;"></div> | |
ccd9d7c2 PF |
36 | <script type="text/javascript"> |
37 | g1 = new Dygraph( | |
38 | document.getElementById("noroll"), | |
39 | data_temp, | |
40 | { | |
41 | customBars: true, | |
42 | title: 'Daily Temperatures in New York vs. San Francisco', | |
43 | ylabel: 'Temperature (F)', | |
44 | legend: 'always', | |
45 | labelsDivStyles: { 'textAlign': 'right' }, | |
46 | showRangeSelector: true | |
47 | } | |
48 | ); | |
49 | g2 = new Dygraph( | |
50 | document.getElementById("roll14"), | |
51 | data_temp, | |
52 | { | |
53 | rollPeriod: 14, | |
54 | showRoller: true, | |
55 | customBars: true, | |
56 | title: 'Daily Temperatures in New York vs. San Francisco', | |
57 | ylabel: 'Temperature (F)', | |
58 | legend: 'always', | |
59 | labelsDivStyles: { 'textAlign': 'right' }, | |
de8f284f | 60 | xAxisHeight: 14, |
ccd9d7c2 PF |
61 | showRangeSelector: true, |
62 | rangeSelectorHeight: 30, | |
63 | rangeSelectorPlotStrokeColor: 'yellow', | |
64 | rangeSelectorPlotFillColor: 'lightyellow' | |
65 | } | |
66 | ); | |
28dde896 DE |
67 | g3 = new Dygraph( |
68 | document.getElementById("nochart"), | |
69 | [[0,1],[10,1]], | |
70 | { | |
71 | xAxisHeight: 30, | |
72 | drawXAxis: false, | |
73 | showRangeSelector: true, | |
8ef9d44d | 74 | rangeSelectorHeight: 30 |
28dde896 DE |
75 | } |
76 | ); | |
ccd9d7c2 PF |
77 | </script> |
78 | </body> | |
79 | </html> |