Remove naming of anoymous functions. Unnecessary and slightly wrong.
[dygraphs.git] / tests / independent-series.html
index e3ae8a4..eb9a604 100644 (file)
@@ -1,13 +1,17 @@
+<!DOCTYPE html>
 <html>
   <head>
+    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
     <title>Independent Series</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>
+    <!--
+    For production (minified) code, use:
+    <script type="text/javascript" src="dygraph-combined.js"></script>
+    -->
+    <script type="text/javascript" src="../dygraph-dev.js"></script>
+
     <style type="text/css">
       .thinborder {
         border-width: 1px;
@@ -27,6 +31,7 @@
     </style>
   </head>
   <body>
+    <h3>Independent Series</h3>
     <p>By using the connectSeparated attribute, it's possible to display a chart of several time series with completely independent x-values.</p>
 
     <p>The trick is to specify values for the series at the union of the x-values of all series. For one series' x values, specify <code>null</code> for each of the other series.</p>
@@ -78,7 +83,7 @@
     </tr></table>
 
     <script type="text/javascript">
-    new Dygraph(
+    var g1 = new Dygraph(
       document.getElementById("graph"),
       [
         [1, null, 3],
     <p>The gap would normally be encoded as a null, or missing value. But when you use <code>connectSeparatedPoints</code>, that has a special meaning. Instead, you have to use <code>NaN</code>. This is a bit of a hack, but it gets the job done.</p> 
 
     <script type="text/javascript">
-    new Dygraph(
+    g2 = new Dygraph(
       document.getElementById("graph2"),
 "x,A,B  \n" +
 "1,,3   \n" +
 "8,8,   \n" +
 "10,10, \n"
       , {
-        labels: ["x", "A", "B" ],
         connectSeparatedPoints: true,
         drawPoints: true
       }