@@ -683,9 +683,9 @@ axes.prepTicks = function(ax, opts) {
683
683
}
684
684
685
685
if ( ! ( ax . minor &&
686
- ( ax . minor . tickmode !== 'array'
687
- && ax . minor . tickmode !== 'domain array'
688
- && ax . minor . tickmode !== 'full domain' ) ) ) {
686
+ ( ax . minor . tickmode !== 'array' &&
687
+ ax . minor . tickmode !== 'domain array' &&
688
+ ax . minor . tickmode !== 'full domain' ) ) ) {
689
689
// add a couple of extra digits for filling in ticks when we
690
690
// have explicit tickvals without tick text
691
691
if ( ax . tickmode === 'array' || ax . tickmode === 'domain array' || ax . tickmode === 'full domain' ) nt *= 100 ;
@@ -952,25 +952,24 @@ axes.calcTicks = function calcTicks(ax, opts) {
952
952
axes . prepTicks ( mockAx , opts ) ;
953
953
}
954
954
955
- if ( mockAx . tickmode === 'full domain' ) {
955
+ if ( mockAx . tickmode === 'full domain' ) {
956
956
var nt = mockAx . nticks ; // does mockAx have nitkcs?
957
957
if ( nt === undefined ) nt = 0 ;
958
- var tickVals = [ ] ;
959
- if ( nt == 0 ) {
958
+ if ( nt === 0 ) {
960
959
// pass
961
- } else if ( nt == 1 ) {
960
+ } else if ( nt = == 1 ) {
962
961
tickVals = [ 0 ] ;
963
- } else if ( nt == 2 ) {
962
+ } else if ( nt = == 2 ) {
964
963
tickVals = [ 0 , 1 ] ;
965
964
} else {
966
- var increment = 1 / ( nt - 1 ) ; // (nt-2) + 1
965
+ var increment = 1 / ( nt - 1 ) ; // (nt-2) + 1
967
966
tickVals . push ( 0 ) ;
968
- for ( let i = 0 ; i < nt - 2 ; i ++ ) {
969
- tickVals . push ( ( i + 1 ) * increment ) ;
967
+ for ( var tickIndex = 0 ; tickIndex < nt - 2 ; tickIndex ++ ) {
968
+ tickVals . push ( ( tickIndex + 1 ) * increment ) ;
970
969
}
971
970
tickVals . push ( 1 ) ;
972
971
}
973
- if ( major ) {
972
+ if ( major ) {
974
973
Lib . nestedProperty ( ax , 'tickvals' ) . set ( tickVals ) ;
975
974
} else {
976
975
Lib . nestedProperty ( ax . minor , 'tickvals' ) . set ( tickVals ) ;
@@ -980,7 +979,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
980
979
// original comment:
981
980
// now that we've figured out the auto values for formatting
982
981
// in case we're missing some ticktext, we can break out for array ticks
983
- if ( mockAx . tickmode === 'array' || mockAx . tickmode === 'domain array' || mockAx . tickmode === 'full domain' ) {
982
+ if ( mockAx . tickmode === 'array' || mockAx . tickmode === 'domain array' || mockAx . tickmode === 'full domain' ) {
984
983
// Mapping proportions to array:
985
984
if ( mockAx . tickmode === 'domain array' || mockAx . tickmode === 'full domain' ) {
986
985
var width = ( maxRange - minRange ) ;
@@ -1278,12 +1277,12 @@ axes.calcTicks = function calcTicks(ax, opts) {
1278
1277
// Reset tickvals back to domain array
1279
1278
if ( tickFractionalVals . _isSet ) {
1280
1279
delete tickFractionalVals . _isSet ;
1281
- if ( ax . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1280
+ if ( ax . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1282
1281
Lib . nestedProperty ( ax , 'tickvals' ) . set ( tickFractionalVals ) ;
1283
1282
}
1284
1283
if ( minorTickFractionalVals . _isSet ) {
1285
1284
delete tickFractionalVals . _isSet ;
1286
- if ( ax . minor . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1285
+ if ( ax . minor . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1287
1286
Lib . nestedProperty ( ax . minor , 'tickvals' ) . set ( minorTickFractionalVals ) ;
1288
1287
}
1289
1288
0 commit comments