@@ -682,13 +682,10 @@ axes.prepTicks = function(ax, opts) {
682
682
if ( ax . _name === 'radialaxis' ) nt *= 2 ;
683
683
}
684
684
685
- if ( ! ( ax . minor &&
686
- ( ax . minor . tickmode !== 'array' &&
687
- ax . minor . tickmode !== 'domain array' &&
688
- ax . minor . tickmode !== 'full domain' ) ) ) {
685
+ if ( ! ( ax . minor && ax . minor . tickmode !== 'array' ) ) {
689
686
// add a couple of extra digits for filling in ticks when we
690
687
// have explicit tickvals without tick text
691
- if ( ax . tickmode === 'array' || ax . tickmode === 'domain array' || ax . tickmode === 'full domain' ) nt *= 100 ;
688
+ if ( ax . tickmode === 'array' ) nt *= 100 ;
692
689
}
693
690
694
691
ax . _roughDTick = Math . abs ( rng [ 1 ] - rng [ 0 ] ) / nt ;
@@ -923,12 +920,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
923
920
var minorTicks = [ ] ;
924
921
925
922
var tickVals = [ ] ;
926
- var tickFractionalVals = [ ] ;
927
- tickFractionalVals . _isSet = false ;
928
-
929
923
var minorTickVals = [ ] ;
930
- var minorTickFractionalVals = [ ] ;
931
- minorTickFractionalVals . _isSet = false ;
932
924
933
925
var hasMinor = ax . minor && ( ax . minor . ticks || ax . minor . showgrid ) ;
934
926
@@ -952,61 +944,9 @@ axes.calcTicks = function calcTicks(ax, opts) {
952
944
axes . prepTicks ( mockAx , opts ) ;
953
945
}
954
946
955
- if ( mockAx . tickmode === 'full domain' ) {
956
- var nt = mockAx . nticks ; // does mockAx have nitkcs?
957
- if ( nt === undefined ) nt = 0 ;
958
- if ( nt === 0 ) {
959
- // pass
960
- } else if ( nt === 1 ) {
961
- tickVals = [ 0 ] ;
962
- } else if ( nt === 2 ) {
963
- tickVals = [ 0 , 1 ] ;
964
- } else {
965
- var increment = 1 / ( nt - 1 ) ; // (nt-2) + 1
966
- tickVals . push ( 0 ) ;
967
- for ( var tickIndex = 0 ; tickIndex < nt - 2 ; tickIndex ++ ) {
968
- tickVals . push ( ( tickIndex + 1 ) * increment ) ;
969
- }
970
- tickVals . push ( 1 ) ;
971
- }
972
- if ( major ) {
973
- Lib . nestedProperty ( ax , 'tickvals' ) . set ( tickVals ) ;
974
- } else {
975
- Lib . nestedProperty ( ax . minor , 'tickvals' ) . set ( tickVals ) ;
976
- }
977
- }
978
- // tickmode 'domain array' is just 'array' but with a pre-calc step
979
- // original comment:
980
947
// now that we've figured out the auto values for formatting
981
948
// in case we're missing some ticktext, we can break out for array ticks
982
- if ( mockAx . tickmode === 'array' || mockAx . tickmode === 'domain array' || mockAx . tickmode === 'full domain' ) {
983
- // Mapping proportions to array:
984
- if ( mockAx . tickmode === 'domain array' || mockAx . tickmode === 'full domain' ) {
985
- var width = ( maxRange - minRange ) ;
986
- if ( axrev ) width *= - 1 ;
987
- var offset = ! axrev ? minRange : maxRange ;
988
-
989
- var currentFractionalVals = [ ] ;
990
- var currentValsProp ;
991
- if ( major ) {
992
- currentValsProp = Lib . nestedProperty ( ax , 'tickvals' ) ; // Do we need this?
993
- currentFractionalVals = tickFractionalVals = currentValsProp . get ( ) ;
994
- tickFractionalVals . _isSet = true ;
995
- } else {
996
- currentValsProp = Lib . nestedProperty ( ax . minor , 'tickvals' ) ;
997
- currentFractionalVals = minorTickFractionalVals = currentValsProp . get ( ) ;
998
- minorTickFractionalVals . _isSet = true ;
999
- }
1000
-
1001
- var mappedVals = Lib . simpleMap ( currentFractionalVals ,
1002
- function ( fraction , offset , width , type ) {
1003
- var mapped = offset + ( width * fraction ) ;
1004
- return ( type === 'log' ) ? Math . pow ( 10 , mapped ) : mapped ;
1005
- } , offset , width , type ) ;
1006
- currentValsProp . set ( mappedVals ) ;
1007
- }
1008
-
1009
- // Original 'array' only code
949
+ if ( mockAx . tickmode === 'array' ) {
1010
950
if ( major ) {
1011
951
tickVals = [ ] ;
1012
952
ticksOut = arrayTicks ( ax , ! isMinor ) ;
@@ -1264,7 +1204,6 @@ axes.calcTicks = function calcTicks(ax, opts) {
1264
1204
ticksOut . push ( t ) ;
1265
1205
}
1266
1206
}
1267
-
1268
1207
ticksOut = ticksOut . concat ( minorTicks ) ;
1269
1208
1270
1209
ax . _inCalcTicks = false ;
@@ -1274,18 +1213,6 @@ axes.calcTicks = function calcTicks(ax, opts) {
1274
1213
ticksOut [ 0 ] . noTick = true ;
1275
1214
}
1276
1215
1277
- // Reset tickvals back to domain array
1278
- if ( tickFractionalVals . _isSet ) {
1279
- delete tickFractionalVals . _isSet ;
1280
- if ( ax . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1281
- Lib . nestedProperty ( ax , 'tickvals' ) . set ( tickFractionalVals ) ;
1282
- }
1283
- if ( minorTickFractionalVals . _isSet ) {
1284
- delete tickFractionalVals . _isSet ;
1285
- if ( ax . minor . tickmode === 'full domain' ) tickFractionalVals = [ ] ;
1286
- Lib . nestedProperty ( ax . minor , 'tickvals' ) . set ( minorTickFractionalVals ) ;
1287
- }
1288
-
1289
1216
return ticksOut ;
1290
1217
} ;
1291
1218
@@ -1690,7 +1617,7 @@ axes.tickFirst = function(ax, opts) {
1690
1617
// more precision for hovertext
1691
1618
axes . tickText = function ( ax , x , hover , noSuffixPrefix ) {
1692
1619
var out = tickTextObj ( ax , x ) ;
1693
- var arrayMode = ( ax . tickmode === 'array' || ax . tickmode === 'domain array' || ax . tickmode === 'full domain' ) ;
1620
+ var arrayMode = ax . tickmode === 'array' ;
1694
1621
var extraPrecision = hover || arrayMode ;
1695
1622
var axType = ax . type ;
1696
1623
// TODO multicategory, if we allow ticktext / tickvals
@@ -3406,7 +3333,7 @@ axes.drawGrid = function(gd, ax, opts) {
3406
3333
3407
3334
var counterAx = opts . counterAxis ;
3408
3335
if ( counterAx && axes . shouldShowZeroLine ( gd , ax , counterAx ) ) {
3409
- var isArrayMode = ( ax . tickmode === 'array' || ax . tickmode === 'domain array' || ax . tickmode === 'full domain' ) ;
3336
+ var isArrayMode = ax . tickmode === 'array' ;
3410
3337
for ( var i = 0 ; i < majorVals . length ; i ++ ) {
3411
3338
var xi = majorVals [ i ] . x ;
3412
3339
if ( isArrayMode ? ! xi : ( Math . abs ( xi ) < ax . dtick / 100 ) ) {
0 commit comments