First shot at panFrame, which frames how far you can pan outside the graph's visible...
[dygraphs.git] / tests / zoom.html
index ad0bc9d..c0de5c1 100644 (file)
       <input type="button" value="Y (2,4)" onclick="zoomGraphY(2,4)">&nbsp;
       <input type="button" value="Y (0,2)" onclick="zoomGraphY(0,2)">&nbsp;
       <input type="button" value="Y (0,1)" onclick="zoomGraphY(0,1)">&nbsp;
-      <br>
+      <br> <br>
       <input type="button" value="Oct 8-13" onclick="zoomGraphX(1160261979962, 1163905694248)">&nbsp;
       <input type="button" value="Oct 22-28" onclick="zoomGraphX(1161489164461 , 1162008465957)">&nbsp;
       <input type="button" value="Oct 23-24" onclick="zoomGraphX(1161575878860, 1161660991675)">&nbsp;
       <input type="button" value="Oct 26 6AM-noon" onclick="zoomGraphX(1161770537840, 1161792063332)">&nbsp;
-      <br>
+      <br> <br>
       <input type="button" value="Unzoom" onclick="unzoomGraph()">&nbsp;
+      <br> <br>
+      <input type="button" value="pan frame 0" onclick="panFrame(0)">&nbsp;
+      <input type="button" value="pan frame 0.1" onclick="panFrame(0.1)">&nbsp;
+      <input type="button" value="pan frame 0.5" onclick="panFrame(0.5)">&nbsp;
       </p>
 
 
           valueRange: null
         });
       }
+
+      function panFrame(value) {
+        g.updateOptions({ panFrame : value });
+      }
     </script>
 
   </body>