mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Merge pull request #1814 from hallatore/Bug_SuggestedMinMax
Have to check for undefined because "if (0.0)" would equal false.
This commit is contained in:
commit
fc3a3aedaf
@ -129,13 +129,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.ticks.suggestedMin) {
|
||||
if (this.options.ticks.suggestedMin !== undefined) {
|
||||
this.min = Math.min(this.min, this.options.ticks.suggestedMin);
|
||||
} else if (this.options.ticks.min !== undefined) {
|
||||
this.min = this.options.ticks.min;
|
||||
}
|
||||
|
||||
if (this.options.ticks.suggestedMax) {
|
||||
if (this.options.ticks.suggestedMax !== undefined) {
|
||||
this.max = Math.max(this.max, this.options.ticks.suggestedMax);
|
||||
} else if (this.options.ticks.max !== undefined) {
|
||||
this.max = this.options.ticks.max;
|
||||
|
Loading…
Reference in New Issue
Block a user