X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Fzoom.html;h=24a28288a96bf08fd75afd94c64b50df939381c2;hb=937029dffe23b54b2269a180ece191c5625744e5;hp=c59284a0dd1f098d763d176227f599c04bb315ed;hpb=a2db51b539e5a5db661501a10e8925249218cd15;p=dygraphs.git diff --git a/tests/zoom.html b/tests/zoom.html index c59284a..24a2828 100644 --- a/tests/zoom.html +++ b/tests/zoom.html @@ -1,6 +1,6 @@ - noise + zoom @@ -11,19 +11,26 @@ -

Click the buttons to change the zoom

+

Click the buttons to change the zoom level or just use the normal + click-and drag.

Window coordinates (in dates and values):

Zoom operations:

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

@@ -43,7 +50,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) { @@ -53,21 +59,16 @@ "valueRange : [" + minValue + " , "+ maxValue + "],"; } - function sizeGraph(i) { - switch(i) { - case 0: g.doUnzoom_(); - break; - case 1: g.doZoomYValues_(5, 3); - break; - case 2: g.doZoomYValues_(4, 0); - break; - case 3: g.doZoomYValues_(4, 2); - break; - case 4: g.doZoomYValues_(2, 0); - break; - case 5: g.doZoomYValues_(1, 0); - break; - } + function zoomGraphX(minDate, maxDate) { + g.doZoomXDates_(minDate, maxDate); + } + + function zoomGraphY(minValue, maxValue) { + g.doZoomYValues_(minValue, maxValue); + } + + function unzoomGraph() { + g.doUnzoom_(); }