From: Dan Vanderkam Date: Sat, 16 Oct 2010 21:37:36 +0000 (-0400) Subject: merge in upstream changes X-Git-Tag: v1.0.0~622^2~19 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=f30cf7405c2071be3b802bc569e2cab5a7675afa;p=dygraphs.git merge in upstream changes --- f30cf7405c2071be3b802bc569e2cab5a7675afa diff --cc dygraph.js index 497c7c5,89a461f..23d2bcc --- a/dygraph.js +++ b/dygraph.js @@@ -1451,6 -1457,8 +1456,8 @@@ Dygraph.dateTicker = function(startDate * Add ticks when the x axis has numbers on it (instead of dates) * @param {Number} startDate Start of the date window (millis since epoch) * @param {Number} endDate End of the date window (millis since epoch) + * @param self - * @param {function} formatter: Optional formatter to use for each tick value ++ * @param {function} attribute accessor function. * @return {Array.} Array of {label, value} tuples. * @public */ @@@ -1653,12 -1661,11 +1666,12 @@@ Dygraph.prototype.drawGraph_ = function this.boundaryIds_[i-1] = [0, series.length-1]; } - var extremes = this.extremeValues_(series); - var thisMinY = extremes[0]; - var thisMaxY = extremes[1]; + var seriesExtremes = this.extremeValues_(series); + extremes[seriesName] = seriesExtremes; + var thisMinY = seriesExtremes[0]; + var thisMaxY = seriesExtremes[1]; - if (minY === null || thisMinY < minY) minY = thisMinY; - if (maxY === null || thisMaxY > maxY) maxY = thisMaxY; + if (minY === null || (thisMinY != null && thisMinY < minY)) minY = thisMinY; + if (maxY === null || (thisMaxY != null && thisMaxY > maxY)) maxY = thisMaxY; if (bars) { for (var j=0; j