From: Robert Konigsberg Date: Sun, 21 Nov 2010 02:26:39 +0000 (-0500) Subject: fix dygraphs/actually get the callback right. X-Git-Tag: v1.0.0~599^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=ac139d1908ef3290db10222920e856f1a1a701ab;hp=f0f2aef666950ea136e1ede7bc286ccb07c2c6b6;p=dygraphs.git fix dygraphs/actually get the callback right. Update documentation. --- diff --git a/docs/index.html b/docs/index.html index adc7c15..b9eff54 100644 --- a/docs/index.html +++ b/docs/index.html @@ -625,9 +625,9 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) zoomCallback - function(minDate,
maxDate,
minValue,
maxValue){}
+ function(minDate,
maxDate,
yRanges){}
null - A function to call when the zoom window is changed (either by zooming in or out). minDate and maxDate are milliseconds since epoch. minValue and maxValue are y-axis range values. + A function to call when the zoom window is changed (either by zooming in or out). minDate and maxDate are milliseconds since epoch. yRanges is an array of [bottom, top] pairs, one for each y-axis.
Tests: callback zoom
diff --git a/dygraph.js b/dygraph.js index 7d64bb9..bd89a90 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1086,7 +1086,7 @@ Dygraph.prototype.doZoomXDates_ = function(minDate, maxDate) { this.dateWindow_ = [minDate, maxDate]; this.drawGraph_(); if (this.attr_("zoomCallback")) { - this.attr_("zoomCallback")(minDate, maxDate, this.yAxisRange()); + this.attr_("zoomCallback")(minDate, maxDate, this.yAxisRanges()); } };