X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Fzoom.html;h=10b0457f5a8270be8664339a2ec3611fd811ec92;hb=3c1d225b3097891e863631bdb3b81a1250a5cce4;hp=9a62392c3c317ef629c6900c4aa183b618785a2c;hpb=90b1513359a9e9368a389285e750b67e1cfa20f3;p=dygraphs.git diff --git a/tests/zoom.html b/tests/zoom.html index 9a62392..10b0457 100644 --- a/tests/zoom.html +++ b/tests/zoom.html @@ -40,7 +40,9 @@ document.getElementById("div_g"), NoisyData, { errorBars: true, - zoomCallback : function(a,b,c,d) { showDimensions(a,b,c,d); } + zoomCallback : function(minDate, maxDate, yRange) { + showDimensions(minDate, maxDate, yRange); + } } ); @@ -50,13 +52,12 @@ // Pull an initial value for logging. var minDate = g.xAxisRange()[0]; var maxDate = g.xAxisRange()[1]; - var minValue = g.yAxisRange()[0]; - var maxValue = g.yAxisRange()[1]; - showDimensions(minDate, maxDate, minValue, maxValue); + var minValue = g.yAxisRange(); + showDimensions(minDate, maxDate, yAxisRange); - function showDimensions(minDate, maxDate, minValue, maxValue) { + function showDimensions(minDate, maxDate, yAxisRange) { showXDimensions(minDate, maxDate); - showYDimensions(minValue, maxValue); + showYDimensions(yAxisRange); } function showXDimensions(first, second) { @@ -64,9 +65,9 @@ elem.innerHTML = "dateWindow : [" + first + ", "+ second + "]"; } - function showYDimensions(first, second) { + function showYDimensions(range) { var elem = document.getElementById("ydimensions"); - elem.innerHTML = "valueRange : [" + first + ", "+ second + "]"; + elem.innerHTML = "valueRange : [" + range + "]"; } function zoomGraphX(minDate, maxDate) {