mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Cleaner handling of fitting no ticks (#7212)
This commit is contained in:
parent
b73b8f9863
commit
e46420e595
@ -726,7 +726,7 @@ export default class Scale extends Element {
|
||||
}
|
||||
|
||||
// Don't bother fitting the ticks if we are not showing the labels
|
||||
if (tickOpts.display && display) {
|
||||
if (tickOpts.display && display && me.ticks.length) {
|
||||
const labelSizes = me._getLabelSizes();
|
||||
const firstLabelSize = labelSizes.first;
|
||||
const lastLabelSize = labelSizes.last;
|
||||
|
Loading…
Reference in New Issue
Block a user