X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=tests%2Fzoom.html;h=a835dc379102c2e24d3c5365e3fedfc4a5b37c47;hb=c70fe730d3e8a4ff32f9371d95a7894441f2f671;hp=d37a26d0eb100f31f63e5f135241651d97352c3f;hpb=a593879d42f14356ba6ff9c213d9d64f32d1714c;p=dygraphs.git
diff --git a/tests/zoom.html b/tests/zoom.html
index d37a26d..a835dc3 100644
--- a/tests/zoom.html
+++ b/tests/zoom.html
@@ -1,13 +1,17 @@
+
+
zoom
-
-
-
-
+
+
+
@@ -31,13 +35,17 @@
-
+
-
+
+
+
+
+
@@ -63,12 +71,13 @@
// Pull an initial value for logging.
var minDate = g.xAxisRange()[0];
var maxDate = g.xAxisRange()[1];
- var minValue = g.yAxisRange();
- showDimensions(minDate, maxDate, yAxisRange);
+ var minValue = g.yAxisRange()[0];
+ var maxValue = g.yAxisRange()[1];
+ showDimensions(minDate, maxDate, [minValue, maxValue]);
- function showDimensions(minDate, maxDate, yAxisRange) {
+ function showDimensions(minDate, maxDate, yRanges) {
showXDimensions(minDate, maxDate);
- showYDimensions(yAxisRange);
+ showYDimensions(yRanges);
}
function showXDimensions(first, second) {
@@ -76,9 +85,9 @@
elem.innerHTML = "dateWindow : [" + first + ", "+ second + "]";
}
- function showYDimensions(range) {
+ function showYDimensions(ranges) {
var elem = document.getElementById("ydimensions");
- elem.innerHTML = "valueRange : [" + range + "]";
+ elem.innerHTML = "valueRange : [" + ranges + "]";
}
function zoomGraphX(minDate, maxDate) {
@@ -92,7 +101,7 @@
g.updateOptions({
valueRange: [minValue, maxValue]
});
- showYDimensions(minValue, maxValue);
+ showYDimensions(g.yAxisRanges());
}
function unzoomGraph() {
@@ -101,6 +110,10 @@
valueRange: null
});
}
+
+ function panEdgeFraction(value) {
+ g.updateOptions({ panEdgeFraction : value });
+ }