X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=tests%2Fzoom.html;h=a835dc379102c2e24d3c5365e3fedfc4a5b37c47;hb=3adf4a6f00d3577b925338891a0b021ebc5ae325;hp=91cee4371a262e5d62c9646bdca9c8b4e05f7d57;hpb=f99d913cd73b0d91850c09985237f6683713cdd2;p=dygraphs.git
diff --git a/tests/zoom.html b/tests/zoom.html
index 91cee43..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,9 +54,15 @@
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");
}
+ }
);
// TODO(konigsberg): Implement a visualization that verifies that initial
@@ -56,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) {
@@ -90,6 +110,10 @@
valueRange: null
});
}
+
+ function panEdgeFraction(value) {
+ g.updateOptions({ panEdgeFraction : value });
+ }