Merge pull request #4148 from stormpython/fix/changeLogOrigin

Starts the log scale origin by default at 1
This commit is contained in:
Joe Fleming 2015-06-09 15:42:30 -07:00
commit c5e159e1d7

View file

@ -61,9 +61,10 @@ define(function (require) {
var min = domain[0];
var max = domain[1];
if (this._isUserDefined()) return this._validateUserExtents(domain);
if (this._isYExtents()) return domain;
if (this._attr.scale === 'log') return this._logDomain(min, max); // Negative values cannot be displayed with a log scale.
if (!this._isYExtents() && !this._isUserDefined()) return [Math.min(0, min), Math.max(0, max)];
if (this._isUserDefined()) return this._validateUserExtents(domain);
return domain;
};
@ -101,7 +102,7 @@ define(function (require) {
*/
YAxis.prototype._logDomain = function (min, max) {
if (min < 0 || max < 0) return this._throwLogScaleValuesError();
return [Math.max(1, min), max];
return [1, max];
};
/**