mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Scale expansion if min === max will only occur after ticks.beginAtZero is handled
This commit is contained in:
parent
85572d7b67
commit
988034cef6
@ -100,12 +100,6 @@
|
||||
}, this);
|
||||
}
|
||||
|
||||
if (this.min === this.max) {
|
||||
this.min--;
|
||||
this.max++;
|
||||
}
|
||||
|
||||
|
||||
// Then calulate the ticks
|
||||
this.ticks = [];
|
||||
|
||||
@ -146,6 +140,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (this.min === this.max) {
|
||||
this.min--;
|
||||
this.max++;
|
||||
}
|
||||
|
||||
var niceRange = helpers.niceNum(this.max - this.min, false);
|
||||
var spacing = helpers.niceNum(niceRange / (maxTicks - 1), true);
|
||||
var niceMin = Math.floor(this.min / spacing) * spacing;
|
||||
|
Loading…
Reference in New Issue
Block a user