more x-axis time resolutions
[dygraphs.git] / tests / hourly.html
index eb84705..f1aff26 100644 (file)
@@ -14,6 +14,9 @@
     <p>Minutely data:</p>
     <div id="gm" style="width:600px; height:300px;"></div>
 
+    <p>Secondly data:</p>
+    <div id="gs" style="width:600px; height:300px;"></div>
+
     <script type="text/javascript">
       g = new DateGraph(
             document.getElementById("g"),
               return ret;
             }, null, {}
           );
+
+      gs = new DateGraph(
+            document.getElementById("gs"),
+            function() {
+              var ret = "Date,Minutes,Seconds\n";
+              var zp = function(x) { if (x<10) return "0"+x; else return ""+x;};
+              for (var h = 0; h <= 1; h++) {
+                for (var m = 0; m < 60; m++) {
+                  for (var s = 0; s < 60; s++) {
+                    ret += "2008/07/01 " + zp(h) + ":" + zp(m) + ":" + zp(s) +
+                        "," + (h*60 + m) + "," + s + "\n";
+                  }
+                }
+              }
+              return ret;
+            }, null, {}
+          );
     </script>
   </body>
 </html>