Zooming in log scale has been fixed, toDataCoordY was basically broken.
authorRobert Konigsberg <konigsberg@google.com>
Sat, 29 Jan 2011 17:14:45 +0000 (12:14 -0500)
committerRobert Konigsberg <konigsberg@google.com>
Sat, 29 Jan 2011 17:14:45 +0000 (12:14 -0500)
dygraph.js

index 3196163..9055ad8 100644 (file)
@@ -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.