From b70247dcb4ad8aaf3a071a95084442441a076059 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Sat, 29 Jan 2011 12:14:45 -0500 Subject: [PATCH] Zooming in log scale has been fixed, toDataCoordY was basically broken. --- dygraph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- 2.7.4