Set up test file for logscale
authorRobert Konigsberg <konigsberg@google.com>
Wed, 29 Dec 2010 22:00:33 +0000 (14:00 -0800)
committerRobert Konigsberg <konigsberg@google.com>
Wed, 29 Dec 2010 22:00:33 +0000 (14:00 -0800)
tests/logscale.html [new file with mode: 0644]

diff --git a/tests/logscale.html b/tests/logscale.html
new file mode 100644 (file)
index 0000000..20d4a1a
--- /dev/null
@@ -0,0 +1,39 @@
+<html>
+  <head>
+    <title>log scale</title>
+    <!--[if IE]>
+    <script type="text/javascript" src="../excanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../strftime/strftime-min.js"></script>
+    <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
+    <script type="text/javascript" src="../dygraph-canvas.js"></script>
+    <script type="text/javascript" src="../dygraph.js"></script>
+  </head>
+  <script>
+
+function NoisyData() {
+return "" +
+"Date,A\n" +
+"20061124,3.18584070796\n" +
+"20061125,2.83185840708\n" +
+"20061126,3.01953818828\n" +
+"20061127,2.81195079086\n" +
+"20061128,2.97723292469\n" +
+"20061129,1.41093474427";
+}
+  </script>
+  <body>
+    <h1>Log scale demo - work in progress</h1>
+    <div id="div_g" style="width:600px; height:300px;"></div>
+      
+    <input type="button" value="log scale" onclick="logScale()">
+    <input type="button" value="linear scale" onclick="linearScale()">
+    <script type="text/javascript">
+      var g = new Dygraph(document.getElementById("div_g"),
+                     NoisyData, { logscale : true });
+      function logScale() { g.updateOptions({ logscale : true })}
+      function linearScale() { g.updateOptions({ logscale : null })}
+    </script>
+
+  </body>
+</html>