File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -702,8 +702,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
702
702
var maxRange = Math . max ( rng [ 0 ] , rng [ 1 ] ) ;
703
703
704
704
var definedDelta ;
705
- var tickformat = axes . getTickFormat ( ax ) ; // don't use ax.tickformat directly
706
- if ( isPeriod ) {
705
+ var tickformat = axes . getTickFormat ( ax ) ;
706
+ if ( isPeriod && tickformat ) {
707
707
if (
708
708
! ( / % [ f L Q s S M H I p X ] / . test ( tickformat ) )
709
709
// %f: microseconds as a decimal number [000000, 999999]
@@ -946,7 +946,8 @@ axes.autoTicks = function(ax, roughDTick) {
946
946
// 2 or 3 days... but that's a weird enough case that we'll ignore it.
947
947
ax . tick0 = Lib . dateTick0 ( ax . calendar , true ) ;
948
948
949
- if ( / % [ u V W ] / . test ( ax . tickformat ) ) { // should we use axes.getTickFormat(ax) instead here?
949
+ var tickformat = axes . getTickFormat ( ax ) ;
950
+ if ( / % [ u V W ] / . test ( tickformat ) ) { // should we use axes.getTickFormat(ax) instead here?
950
951
// replace Sunday with Monday for ISO and Monday-based formats
951
952
var len = ax . tick0 . length ;
952
953
var lastD = + ax . tick0 [ len - 1 ] ;
You can’t perform that action at this time.
0 commit comments