mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
min/max should have precedence over suggestedMin/suggestedMax
This commit is contained in:
parent
31721a353c
commit
a0c359ee80
@ -129,16 +129,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.ticks.suggestedMin !== undefined) {
|
||||
this.min = Math.min(this.min, this.options.ticks.suggestedMin);
|
||||
} else if (this.options.ticks.min !== undefined) {
|
||||
if (this.options.ticks.min !== undefined) {
|
||||
this.min = this.options.ticks.min;
|
||||
} else if (this.options.ticks.suggestedMin !== undefined) {
|
||||
this.min = Math.min(this.min, this.options.ticks.suggestedMin);
|
||||
}
|
||||
|
||||
if (this.options.ticks.suggestedMax !== undefined) {
|
||||
this.max = Math.max(this.max, this.options.ticks.suggestedMax);
|
||||
} else if (this.options.ticks.max !== undefined) {
|
||||
if (this.options.ticks.max !== undefined) {
|
||||
this.max = this.options.ticks.max;
|
||||
} else if (this.options.ticks.suggestedMax !== undefined) {
|
||||
this.max = Math.max(this.max, this.options.ticks.suggestedMax);
|
||||
}
|
||||
|
||||
if (this.min === this.max) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user