Skip to content

Commit e6c7a5b

Browse files
committed
Don't skip hidden minor ticks, they can also be labeled.
1 parent f933e2e commit e6c7a5b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/plots/cartesian/axes.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,9 +1207,9 @@ axes.calcTicks = function calcTicks(ax, opts) {
12071207
// check if ticklabelIndex makes sense, otherwise ignore it.
12081208
// It makes sense if in addition to the always present dummy, there are at least 2 minor ticks
12091209
// with the required distance to each other.
1210-
const visibleMinorTicks = minorTickVals.filter((minorTick) => minorTick.noTick !== true);
12111210
if (ax._useTicklabelIndex) {
1212-
if(!visibleMinorTicks || visibleMinorTicks.length < 2) {
1211+
const visibleMinorTicks = minorTickVals.filter((minorTick) => !minorTick.noTick);
1212+
if (visibleMinorTicks.length < 2) {
12131213
ax._useTicklabelIndex = false;
12141214
} else {
12151215
const diff = (visibleMinorTicks[1].value - visibleMinorTicks[0].value) * (isReversed ? -1 : 1);
@@ -1280,9 +1280,9 @@ axes.calcTicks = function calcTicks(ax, opts) {
12801280
if(!allowedToOverlap) {
12811281
// remove duplicate minors
12821282
var list = [];
1283-
for(var k = 0; k < visibleMinorTicks.length; k++) {
1284-
if (findOverlappingTick(visibleMinorTicks[k], tickVals) == null) {
1285-
list.push(visibleMinorTicks[k]);
1283+
for(var k = 0; k < minorTickVals.length; k++) {
1284+
if (findOverlappingTick(minorTickVals[k], tickVals) == null) {
1285+
list.push(minorTickVals[k]);
12861286
}
12871287
}
12881288
minorTickVals = list;

0 commit comments

Comments
 (0)