mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-12 11:16:51 +01:00
Fix a bug where ticks get culled when they don't need to be
This commit is contained in:
2
Chart.js
vendored
2
Chart.js
vendored
@@ -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
2
Chart.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user