Bug fix for dygraph point selection touch event.
[dygraphs.git] / tests / synchronize.html
index 92a4e4a..b3fe628 100644 (file)
@@ -1,17 +1,10 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
+    <link rel="stylesheet" href="../dist/dygraph.css">
     <title>synchronize</title>
-    <!--[if IE]>
-    <script type="text/javascript" src="../excanvas.js"></script>
-    <![endif]-->
-    <!--
-    For production (minified) code, use:
-    <script type="text/javascript" src="dygraph-combined.js"></script>
-    -->
-    <script type="text/javascript" src="../dygraph-dev.js"></script>
-    <script type="text/javascript" src="../extras/synchronizer.js"></script>
+    <script type="text/javascript" src="../dist/dygraph.js"></script>
+    <script type="text/javascript" src="../src/extras/synchronizer.js"></script>
 
     <script type="text/javascript" src="data.js"></script>
     <style>
@@ -27,7 +20,7 @@
     <p>Zooming and panning on any of the charts will zoom and pan all the
     others. Selecting points on one will select points on the others.</p>
 
-    <p>To use this, source <a href="https://github.com/danvk/dygraphs/blob/master/extras/synchronizer.js"><code>extras/synchronizer.js</code></a> on your page.
+    <p>To use this, source <a href="https://github.com/danvk/dygraphs/blob/master/src/extras/synchronizer.js"><code>extras/synchronizer.js</code></a> on your page.
     See the comments in that file for usage.</p>
 
     <div class="chart-container">
@@ -41,6 +34,7 @@
       Synchronize what?
       <input type=checkbox id='chk-zoom' checked onChange='update()'><label for='chk-zoom'> Zoom</label>
       <input type=checkbox id='chk-selection' checked onChange='update()'><label for='chk-selection'> Selection</label>
+      <input type=checkbox id='chk-range' checked onChange='update()'><label for='chk-range'> Range (y-axis)</label>
     </p>
 
     <script type="text/javascript">
       var sync = Dygraph.synchronize(gs);
       
       function update() {
-        var zoom = document.getElementById('chk-zoom').checked;
-        var selection = document.getElementById('chk-selection').checked;
+        var zoom = document.getElementById('chk-zoom').checked,
+            selection = document.getElementById('chk-selection').checked,
+            syncRange = document.getElementById('chk-range').checked;
+        document.getElementById('chk-range').disabled = !zoom;
+
         sync.detach();
         sync = Dygraph.synchronize(gs, {
           zoom: zoom,
-          selection: selection
+          selection: selection,
+          range: syncRange
         });
       }
     </script>