File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1183,15 +1183,21 @@ axes.calcTicks = function calcTicks(ax, opts) {
11831183 const smallerMinorTicks = minorTickValsAscending . filter ( ( minorTick ) => minorTick . value <= majorTick . value ) ;
11841184 const absLabelIndex = Math . abs ( labelIndex ) ;
11851185 const minorTickIndex = smallerMinorTicks . length - absLabelIndex - 1 ;
1186- if ( absLabelIndex <= smallerMinorTicks . length - 1 && ! smallerMinorTicks [ minorTickIndex ] . noTick ) {
1187- allTicklabelVals . push ( smallerMinorTicks [ minorTickIndex ] ) ;
1188- if ( isPeriod ) periodEndTicks . push ( smallerMinorTicks [ minorTickIndex + 1 ] ) ;
1186+ if ( absLabelIndex <= smallerMinorTicks . length - 1 ) {
1187+ const labelVisible = ! smallerMinorTicks [ minorTickIndex ] . noTick || ( isPeriod && ! smallerMinorTicks [ minorTickIndex + 1 ] . noTick ) ;
1188+ if ( labelVisible ) {
1189+ allTicklabelVals . push ( smallerMinorTicks [ minorTickIndex ] ) ;
1190+ if ( isPeriod ) periodEndTicks . push ( smallerMinorTicks [ minorTickIndex + 1 ] ) ;
1191+ }
11891192 }
11901193 } else { // labelIndex >= 0
11911194 const largerMinorTicks = minorTickValsAscending . filter ( ( minorTick ) => minorTick . value >= majorTick . value ) ;
1192- if ( labelIndex < largerMinorTicks . length - 1 && ! largerMinorTicks [ labelIndex ] . noTick ) {
1193- allTicklabelVals . push ( largerMinorTicks [ labelIndex ] ) ;
1194- if ( isPeriod ) periodEndTicks . push ( largerMinorTicks [ labelIndex + 1 ] ) ;
1195+ if ( labelIndex < largerMinorTicks . length - 1 ) {
1196+ const labelVisible = ! largerMinorTicks [ labelIndex ] . noTick || ( isPeriod && ! largerMinorTicks [ labelIndex + 1 ] . noTick ) ;
1197+ if ( labelVisible ) {
1198+ allTicklabelVals . push ( largerMinorTicks [ labelIndex ] ) ;
1199+ if ( isPeriod ) periodEndTicks . push ( largerMinorTicks [ labelIndex + 1 ] ) ;
1200+ }
11951201 }
11961202 }
11971203 majorTick . skipLabel = true ;
You can’t perform that action at this time.
0 commit comments