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);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.min === this.max) {
|
|
||||||
this.min--;
|
|
||||||
this.max++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Then calulate the ticks
|
// Then calulate the ticks
|
||||||
this.ticks = [];
|
this.ticks = [];
|
||||||
|
|
||||||
@ -144,6 +138,11 @@
|
|||||||
// move the botttom down to 0
|
// move the botttom down to 0
|
||||||
this.min = 0;
|
this.min = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.min === this.max) {
|
||||||
|
this.min--;
|
||||||
|
this.max++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var niceRange = helpers.niceNum(this.max - this.min, false);
|
var niceRange = helpers.niceNum(this.max - this.min, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user