mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Rebuild.
This commit is contained in:
parent
24306b8b00
commit
541874b2ce
60
morris.js
60
morris.js
@ -234,38 +234,8 @@
|
||||
this.xmin -= 1;
|
||||
this.xmax += 1;
|
||||
}
|
||||
if (typeof this.options.ymax === 'string') {
|
||||
if (this.options.ymax.slice(0, 4) === 'auto') {
|
||||
if (this.options.ymax.length > 5) {
|
||||
this.ymax = parseInt(this.options.ymax.slice(5), 10);
|
||||
if (ymax != null) {
|
||||
this.ymax = Math.max(ymax, this.ymax);
|
||||
}
|
||||
} else {
|
||||
this.ymax = ymax != null ? ymax : 0;
|
||||
}
|
||||
} else {
|
||||
this.ymax = parseInt(this.options.ymax, 10);
|
||||
}
|
||||
} else {
|
||||
this.ymax = this.options.ymax;
|
||||
}
|
||||
if (typeof this.options.ymin === 'string') {
|
||||
if (this.options.ymin.slice(0, 4) === 'auto') {
|
||||
if (this.options.ymin.length > 5) {
|
||||
this.ymin = parseInt(this.options.ymin.slice(5), 10);
|
||||
if (ymin != null) {
|
||||
this.ymin = Math.min(ymin, this.ymin);
|
||||
}
|
||||
} else {
|
||||
this.ymin = ymin !== null ? ymin : 0;
|
||||
}
|
||||
} else {
|
||||
this.ymin = parseInt(this.options.ymin, 10);
|
||||
}
|
||||
} else {
|
||||
this.ymin = this.options.ymin;
|
||||
}
|
||||
this.ymin = this.yboundary('min', ymin);
|
||||
this.ymax = this.yboundary('max', ymax);
|
||||
if (this.ymin === this.ymax) {
|
||||
if (ymin) {
|
||||
this.ymin -= 1;
|
||||
@ -284,6 +254,32 @@
|
||||
}
|
||||
};
|
||||
|
||||
Grid.prototype.yboundary = function(boundaryType, currentValue) {
|
||||
var boundaryOption, suggestedValue;
|
||||
boundaryOption = this.options["y" + boundaryType];
|
||||
if (typeof boundaryOption === 'string') {
|
||||
if (boundaryOption.slice(0, 4) === 'auto') {
|
||||
if (boundaryOption.length > 5) {
|
||||
suggestedValue = parseInt(boundaryOption.slice(5), 10);
|
||||
if (currentValue == null) {
|
||||
return suggestedValue;
|
||||
}
|
||||
return Math[boundaryType](currentValue, suggestedValue);
|
||||
} else {
|
||||
if (currentValue != null) {
|
||||
return currentValue;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return parseInt(boundaryOption, 10);
|
||||
}
|
||||
} else {
|
||||
return boundaryOption;
|
||||
}
|
||||
};
|
||||
|
||||
Grid.prototype._calc = function() {
|
||||
var h, maxYLabelWidth, w;
|
||||
w = this.el.width();
|
||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user