Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
2769de62 DV |
2 | <html> |
3 | <head> | |
10494b48 | 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
6f091595 | 5 | <title>hourly</title> |
2769de62 | 6 | <!--[if IE]> |
a2b2c3a1 | 7 | <script type="text/javascript" src="../excanvas.js"></script> |
2769de62 | 8 | <![endif]--> |
d37dca40 DV |
9 | <script type="text/javascript" src="../strftime/strftime-min.js"></script> |
10 | <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script> | |
285a6bda | 11 | <script type="text/javascript" src="../dygraph-canvas.js"></script> |
2769de62 | 12 | <script type="text/javascript" src="../dygraph.js"></script> |
2769de62 DV |
13 | </head> |
14 | <body> | |
15 | <p>Hourly data:</p> | |
d16579a0 | 16 | <div id="div_g" style="width:600px; height:300px;"></div> |
2769de62 | 17 | |
6b8e33dd | 18 | <p>Minutely data:</p> |
d16579a0 | 19 | <div id="div_gm" style="width:600px; height:300px;"></div> |
6b8e33dd | 20 | |
328bb812 | 21 | <p>Secondly data:</p> |
d16579a0 | 22 | <div id="div_gs" style="width:600px; height:300px;"></div> |
328bb812 | 23 | |
2769de62 | 24 | <script type="text/javascript"> |
285a6bda | 25 | g = new Dygraph( |
d16579a0 | 26 | document.getElementById("div_g"), |
79420a1e DV |
27 | function HourlyData() { |
28 | return "" + | |
29 | "Date,A,B\n" + | |
30 | "2009/07/12 00:00:00,3,4\n" + | |
31 | "2009/07/12 01:00:00,5,6\n" + | |
32 | "2009/07/12 02:00:00,7,6\n" + | |
33 | "2009/07/12 03:00:00,6,5\n" + | |
34 | "2009/07/12 04:00:00,4,7\n" + | |
35 | "2009/07/12 05:00:00,3,6\n" + | |
36 | "2009/07/12 06:00:00,4,6" | |
285a6bda | 37 | } |
2769de62 | 38 | ); |
6b8e33dd | 39 | |
285a6bda | 40 | gm = new Dygraph( |
d16579a0 | 41 | document.getElementById("div_gm"), |
6b8e33dd DV |
42 | function() { |
43 | var ret = "Date,Hours,Minutes\n"; | |
44 | var zp = function(x) { if (x<10) return "0"+x; else return ""+x;}; | |
62c68d8f DV |
45 | for (var d = 0; d <= 1; d++) { |
46 | for (var h = 0; h < 24; h++) { | |
47 | for (var m = 0; m < 60; m++) { | |
48 | ret += "2008/07/" + zp(12 + d) + " " + zp(h) + ":" + zp(m) + | |
49 | "," + (24*d + h) + "," + m + "\n"; | |
50 | } | |
6b8e33dd DV |
51 | } |
52 | } | |
53 | return ret; | |
285a6bda | 54 | } |
6b8e33dd | 55 | ); |
328bb812 | 56 | |
285a6bda | 57 | gs = new Dygraph( |
d16579a0 | 58 | document.getElementById("div_gs"), |
328bb812 DV |
59 | function() { |
60 | var ret = "Date,Minutes,Seconds\n"; | |
61 | var zp = function(x) { if (x<10) return "0"+x; else return ""+x;}; | |
62 | for (var h = 0; h <= 1; h++) { | |
63 | for (var m = 0; m < 60; m++) { | |
64 | for (var s = 0; s < 60; s++) { | |
65 | ret += "2008/07/01 " + zp(h) + ":" + zp(m) + ":" + zp(s) + | |
66 | "," + (h*60 + m) + "," + s + "\n"; | |
67 | } | |
68 | } | |
69 | } | |
70 | return ret; | |
285a6bda | 71 | } |
328bb812 | 72 | ); |
2769de62 DV |
73 | </script> |
74 | </body> | |
75 | </html> |