From: Robert Konigsberg Date: Sat, 29 Jan 2011 17:14:45 +0000 (-0500) Subject: Zooming in log scale has been fixed, toDataCoordY was basically broken. X-Git-Tag: v1.0.0~587^2~12^2~2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=b70247dcb4ad8aaf3a071a95084442441a076059;p=dygraphs.git Zooming in log scale has been fixed, toDataCoordY was basically broken. --- diff --git a/dygraph.js b/dygraph.js index 3196163..9055ad8 100644 --- a/dygraph.js +++ b/dygraph.js @@ -441,7 +441,8 @@ Dygraph.prototype.toDataYCoord = function(y, axis) { var area = this.plotter_.area; var yRange = this.yAxisRange(axis); - if (!axis.logscale) { + if (typeof(axis) == "undefined") axis = 0; + if (!this.axes_[axis].logscale) { return yRange[0] + (area.h - y) / area.h * (yRange[1] - yRange[0]); } else { // Computing the inverse of toDomCoord.