Fix a bug where ticks get culled when they don't need to be

This commit is contained in:
Morley Zhi
2016-01-07 15:57:53 -05:00
parent fe57c8728e
commit 203bbcec6c
3 changed files with 3 additions and 3 deletions

2
Chart.js vendored
View File

@@ -2928,7 +2928,7 @@
// if they defined a max number of ticks,
// increase skipRatio until that number is met
if (maxTicks) {
if (maxTicks && this.ticks.length > maxTicks) {
while (!skipRatio || this.ticks.length / (skipRatio || 1) > maxTicks) {
if (!skipRatio) {
skipRatio = 1;

2
Chart.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -465,7 +465,7 @@
// if they defined a max number of ticks,
// increase skipRatio until that number is met
if (maxTicks) {
if (maxTicks && this.ticks.length > maxTicks) {
while (!skipRatio || this.ticks.length / (skipRatio || 1) > maxTicks) {
if (!skipRatio) {
skipRatio = 1;