X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fzoom.html;h=a835dc379102c2e24d3c5365e3fedfc4a5b37c47;hb=16879a6b4e206378922de67c50f67a38193d5f53;hp=1b6093639b580d2562773c2fbbdc705a611ae74f;hpb=5f3b823b04c883763db7532e131f81e79f032f96;p=dygraphs.git
diff --git a/tests/zoom.html b/tests/zoom.html
index 1b60936..a835dc3 100644
--- a/tests/zoom.html
+++ b/tests/zoom.html
@@ -1,13 +1,17 @@
+
+
zoom
-
-
-
-
+
+
+
@@ -16,8 +20,14 @@
buttons are useful for testing.
Window coordinates (in dates and values):
+
+
Zoomed: False
+
Zoomed X: False
+
Zoomed Y: False
+
+
Zoom operations:
@@ -25,13 +35,17 @@
-
+
-
+
+
+
+
+
@@ -40,8 +54,13 @@
document.getElementById("div_g"),
NoisyData, {
errorBars: true,
- zoomCallback : function(minDate, maxDate, yRanges) {
- showDimensions(minDate, maxDate, yRanges); }
+ zoomCallback : function(minDate, maxDate, yRange) {
+ showDimensions(minDate, maxDate, yRange);
+ },
+ drawCallback: function(me, initial) {
+ document.getElementById("zoomed").innerHTML = "" + me.isZoomed();
+ document.getElementById("zoomedX").innerHTML = "" + me.isZoomed("x");
+ document.getElementById("zoomedY").innerHTML = "" + me.isZoomed("y");
}
}
);
@@ -57,8 +76,8 @@
showDimensions(minDate, maxDate, [minValue, maxValue]);
function showDimensions(minDate, maxDate, yRanges) {
- showXDimensions(minDate, maxDate);
- showYDimensions(yRanges);
+ showXDimensions(minDate, maxDate);
+ showYDimensions(yRanges);
}
function showXDimensions(first, second) {
@@ -82,7 +101,7 @@
g.updateOptions({
valueRange: [minValue, maxValue]
});
- showYDimensions(this.getYRanges());
+ showYDimensions(g.yAxisRanges());
}
function unzoomGraph() {
@@ -91,6 +110,10 @@
valueRange: null
});
}
+
+ function panEdgeFraction(value) {
+ g.updateOptions({ panEdgeFraction : value });
+ }