add strftime to generate-combined and update combined file
[dygraphs.git] / tests / hourly.html
CommitLineData
2769de62
DV
1<html>
2 <head>
3 <title>noise</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="excanvas.js"></script>
6 <![endif]-->
7 <script type="text/javascript" src="../dygraph-combined.js"></script>
8 <script type="text/javascript" src="../dygraph.js"></script>
9 <script type="text/javascript" src="data.js"></script>
10 </head>
11 <body>
12 <p>Hourly data:</p>
13 <div id="g" style="width:600px; height:300px;"></div>
14
6b8e33dd
DV
15 <p>Minutely data:</p>
16 <div id="gm" style="width:600px; height:300px;"></div>
17
2769de62
DV
18 <script type="text/javascript">
19 g = new DateGraph(
20 document.getElementById("g"),
79420a1e
DV
21 function HourlyData() {
22 return "" +
23 "Date,A,B\n" +
24 "2009/07/12 00:00:00,3,4\n" +
25 "2009/07/12 01:00:00,5,6\n" +
26 "2009/07/12 02:00:00,7,6\n" +
27 "2009/07/12 03:00:00,6,5\n" +
28 "2009/07/12 04:00:00,4,7\n" +
29 "2009/07/12 05:00:00,3,6\n" +
30 "2009/07/12 06:00:00,4,6"
31 }, null, {}
2769de62 32 );
6b8e33dd
DV
33
34 gm = new DateGraph(
35 document.getElementById("gm"),
36 function() {
37 var ret = "Date,Hours,Minutes\n";
38 var zp = function(x) { if (x<10) return "0"+x; else return ""+x;};
39 for (var h = 0; h < 48; h++) {
40 for (var m = 0; m < 60; m++) {
41 ret += "2008/07/12 " + zp(h) + ":" + zp(m) +
42 "," + h + "," + m + "\n";
43 }
44 }
45 return ret;
46 }, null, {}
47 );
2769de62
DV
48 </script>
49 </body>
50</html>