mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 12:49:07 +02:00
This fixes #2589
This commit is contained in:
parent
e81299ded4
commit
1f653f3f6e
@ -536,7 +536,7 @@ module.exports = function(Chart) {
|
|||||||
var isLastTick = this.ticks.length === index + 1;
|
var isLastTick = this.ticks.length === index + 1;
|
||||||
|
|
||||||
// Since we always show the last tick,we need may need to hide the last shown one before
|
// Since we always show the last tick,we need may need to hide the last shown one before
|
||||||
var shouldSkip = (skipRatio > 1 && index % skipRatio > 0) || (index % skipRatio === 0 && index + skipRatio > this.ticks.length);
|
var shouldSkip = (skipRatio > 1 && index % skipRatio > 0) || (index % skipRatio === 0 && index + skipRatio >= this.ticks.length);
|
||||||
if (shouldSkip && !isLastTick || (label === undefined || label === null)) {
|
if (shouldSkip && !isLastTick || (label === undefined || label === null)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user