mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #4148 from stormpython/fix/changeLogOrigin
Starts the log scale origin by default at 1
This commit is contained in:
commit
c5e159e1d7
1 changed files with 3 additions and 2 deletions
|
@ -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];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue