File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments