Skip to content

Commit 4f271d9

Browse files
committed
expand checks for various tickformat options
1 parent 93541eb commit 4f271d9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/plots/cartesian/axes.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
688688
return ax.tickformat.indexOf(str) !== -1;
689689
};
690690

691-
if(_has('%d')) definedDelta = ONEDAY;
692-
else if(_has('%b') || _has('%m')) definedDelta = ONEAVGMONTH;
693-
else if(_has('%Y') || _has('%y')) definedDelta = ONEAVGYEAR;
691+
if(
692+
!_has('%f') &&
693+
!_has('%H') &&
694+
!_has('%I') &&
695+
!_has('%L') &&
696+
!_has('%Q') &&
697+
!_has('%S') &&
698+
!_has('%s') &&
699+
!_has('%X')
700+
) {
701+
if(_has('%x') || _has('%d') || _has('%e') || _has('%j')) definedDelta = ONEDAY;
702+
else if(_has('%B') || _has('%b') || _has('%m')) definedDelta = ONEAVGMONTH;
703+
else if(_has('%Y') || _has('%y')) definedDelta = ONEAVGYEAR;
704+
}
694705
}
695706

696707
var ticksOut = new Array(tickVals.length);

0 commit comments

Comments
 (0)