@@ -1118,15 +1118,11 @@ axes.calcTicks = function calcTicks(ax, opts) {
1118
1118
} )
1119
1119
. filter ( function ( index ) { return index !== null ; } ) ;
1120
1120
1121
- var uniqueIndices = [ ] ; // ensure that each label is only drawn once
1122
1121
majorTickIndices . forEach ( function ( majorIdx ) {
1123
1122
ticklabelIndex . map ( function ( nextLabelIdx ) {
1124
1123
var minorIdx = majorIdx + nextLabelIdx ;
1125
- if ( uniqueIndices . indexOf ( minorIdx ) === - 1 ) {
1126
- uniqueIndices . push ( minorIdx ) ;
1127
- if ( minorIdx >= 0 && minorIdx < allTickVals . length ) {
1128
- allTicklabelVals . push ( allTickVals [ minorIdx ] ) ;
1129
- }
1124
+ if ( minorIdx >= 0 && minorIdx < allTickVals . length ) {
1125
+ Lib . pushUnique ( allTicklabelVals , allTickVals [ minorIdx ] ) ;
1130
1126
}
1131
1127
} ) ;
1132
1128
} ) ;
@@ -1224,23 +1220,23 @@ axes.calcTicks = function calcTicks(ax, opts) {
1224
1220
tickVals = tickVals . concat ( minorTickVals ) ;
1225
1221
1226
1222
function setTickLabel ( ax , tickVal ) {
1227
- var t = axes . tickText (
1223
+ var text = axes . tickText (
1228
1224
ax ,
1229
1225
tickVal . value ,
1230
1226
false , // hover
1231
1227
tickVal . simpleLabel // noSuffixPrefix
1232
1228
) ;
1233
1229
var p = tickVal . periodX ;
1234
1230
if ( p !== undefined ) {
1235
- t . periodX = p ;
1231
+ text . periodX = p ;
1236
1232
if ( p > maxRange || p < minRange ) { // hide label if outside the range
1237
- if ( p > maxRange ) t . periodX = maxRange ;
1238
- if ( p < minRange ) t . periodX = minRange ;
1233
+ if ( p > maxRange ) text . periodX = maxRange ;
1234
+ if ( p < minRange ) text . periodX = minRange ;
1239
1235
1240
- hideLabel ( t ) ;
1236
+ hideLabel ( text ) ;
1241
1237
}
1242
1238
}
1243
- return t ;
1239
+ return text ;
1244
1240
}
1245
1241
1246
1242
var t ;
0 commit comments