From ac139d1908ef3290db10222920e856f1a1a701ab Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Sat, 20 Nov 2010 21:26:39 -0500 Subject: [PATCH] fix dygraphs/actually get the callback right. Update documentation. --- docs/index.html | 4 ++-- dygraph.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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()); } }; -- 2.7.4