@@ -1118,15 +1118,11 @@ axes.calcTicks = function calcTicks(ax, opts) {
11181118 } )
11191119 . filter ( function ( index ) { return index !== null ; } ) ;
11201120
1121- var uniqueIndices = [ ] ; // ensure that each label is only drawn once
11221121 majorTickIndices . forEach ( function ( majorIdx ) {
11231122 ticklabelIndex . map ( function ( nextLabelIdx ) {
11241123 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 ] ) ;
11301126 }
11311127 } ) ;
11321128 } ) ;
@@ -1224,23 +1220,23 @@ axes.calcTicks = function calcTicks(ax, opts) {
12241220 tickVals = tickVals . concat ( minorTickVals ) ;
12251221
12261222 function setTickLabel ( ax , tickVal ) {
1227- var t = axes . tickText (
1223+ var text = axes . tickText (
12281224 ax ,
12291225 tickVal . value ,
12301226 false , // hover
12311227 tickVal . simpleLabel // noSuffixPrefix
12321228 ) ;
12331229 var p = tickVal . periodX ;
12341230 if ( p !== undefined ) {
1235- t . periodX = p ;
1231+ text . periodX = p ;
12361232 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 ;
12391235
1240- hideLabel ( t ) ;
1236+ hideLabel ( text ) ;
12411237 }
12421238 }
1243- return t ;
1239+ return text ;
12441240 }
12451241
12461242 var t ;
0 commit comments