X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Fzoom.html;h=ee6fbec8753d07a34a765d929d4f926307abbc34;hb=e3489f4f5e3f880e412f75ac2fea3635fa68e04f;hp=0c214464e3ecf684a03f7d69130ab4baa15626e8;hpb=8b83c6cc6495cf8a22ed2af673736e774a29ca1d;p=dygraphs.git diff --git a/tests/zoom.html b/tests/zoom.html index 0c21446..ee6fbec 100644 --- a/tests/zoom.html +++ b/tests/zoom.html @@ -1,6 +1,6 @@ - noise + zoom @@ -11,18 +11,27 @@ -

Click the buttons to change the zoom

+

Click the buttons to change the zoom level or just use the normal + click-and drag. While zoom typically works by click-and-drag, the + butons are useful for testing.

Window coordinates (in dates and values):

Zoom operations:

-   -   -   -   -   +   +   +   +   +   +
+   +   +   +   +
+  

@@ -42,7 +51,6 @@ var maxDate = g.xAxisRange()[1]; var minValue = g.yAxisRange()[0]; var maxValue = g.yAxisRange()[1]; - showDimensions(minDate, maxDate, minValue, maxValue); function showDimensions(minDate, maxDate, minValue, maxValue) { @@ -52,13 +60,16 @@ "valueRange : [" + minValue + " , "+ maxValue + "],"; } - function sizeGraph(i) { - switch(i) { - case 1: g.doZoomYValues_(4, 2); - break; - case 5: g.doUnzoom_(); - break; - } + function zoomGraphX(minDate, maxDate) { + g.doZoomXDates_(minDate, maxDate); + } + + function zoomGraphY(minValue, maxValue) { + g.doZoomYValues_(minValue, maxValue); + } + + function unzoomGraph() { + g.doUnzoom_(); }