X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=43768a9ac2fec4c1689f3869eb2754c6663a0ad9;hb=refs%2Fheads%2Fwrapped-labels;hp=cf13a590ba41213cb365819cb825e872b02093ca;hpb=e0269a3d8b5b65fecc93226ffbb2f429a8951997;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index cf13a59..43768a9 100644 --- a/dygraph.js +++ b/dygraph.js @@ -226,12 +226,12 @@ Dygraph.dateAxisLabelFormatter = function(date, granularity, opts) { if (granularity >= Dygraph.DECADAL) { return '' + year; } else if (granularity >= Dygraph.MONTHLY) { - return Dygraph.SHORT_MONTH_NAMES_[month] + ' ' + year; + return Dygraph.SHORT_MONTH_NAMES_[month] + ' ' + year; } else { var frac = hours * 3600 + mins * 60 + secs + 1e-3 * millis; if (frac === 0 || granularity >= Dygraph.DAILY) { // e.g. '21 Jan' (%d%b) - return Dygraph.zeropad(day) + ' ' + Dygraph.SHORT_MONTH_NAMES_[month]; + return Dygraph.zeropad(day) + ' ' + Dygraph.SHORT_MONTH_NAMES_[month]; } else { return Dygraph.hmsString_(hours, mins, secs); } @@ -2318,7 +2318,7 @@ Dygraph.prototype.addXTicks_ = function() { var xTicks = xAxisOptionsView('ticker')( range[0], range[1], - this.width_, // TODO(danvk): should be area.width + this.plotter_.area.w, // TODO(danvk): should be area.width xAxisOptionsView, this); // var msg = 'ticker(' + range[0] + ', ' + range[1] + ', ' + this.width_ + ', ' + this.attr_('pixelsPerXLabel') + ') -> ' + JSON.stringify(xTicks); @@ -2972,7 +2972,7 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { var ticker = opts('ticker'); axis.ticks = ticker(axis.computedValueRange[0], axis.computedValueRange[1], - this.height_, // TODO(danvk): should be area.height + this.plotter_.area.h, opts, this); // Define the first independent axis as primary axis. @@ -3003,7 +3003,7 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { axis.ticks = ticker(axis.computedValueRange[0], axis.computedValueRange[1], - this.height_, // TODO(danvk): should be area.height + this.plotter_.area.h, opts, this, tick_values);