@@ -1125,14 +1125,14 @@ describe('Test axes', function() {
1125
1125
it ( 'should only coerce rangebreaks *pattern* with *bounds*' , function ( ) {
1126
1126
layoutIn = {
1127
1127
xaxis : { type : 'date' , rangebreaks : [ { bounds : [ '2020-01-04' , '2020-01-05' ] } ] } ,
1128
- xaxis2 : { type : 'date' , rangebreaks : [ { bounds : [ 6 , 0 ] , pattern : '%w ' } ] } ,
1128
+ xaxis2 : { type : 'date' , rangebreaks : [ { bounds : [ 6 , 0 ] , pattern : 'day of week ' } ] } ,
1129
1129
xaxis3 : { type : 'date' , rangebreaks : [ { values : [ '2020-01-04' , '2020-01-05' ] , pattern : 'NOP' } ] } ,
1130
1130
} ;
1131
1131
layoutOut . _subplots . xaxis . push ( 'x2' , 'x3' ) ;
1132
1132
supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
1133
1133
1134
1134
expect ( layoutOut . xaxis . rangebreaks [ 0 ] . pattern ) . toBe ( '' , 'coerced to dflt value' ) ;
1135
- expect ( layoutOut . xaxis2 . rangebreaks [ 0 ] . pattern ) . toBe ( '%w ' , 'coerced' ) ;
1135
+ expect ( layoutOut . xaxis2 . rangebreaks [ 0 ] . pattern ) . toBe ( 'day of week ' , 'coerced' ) ;
1136
1136
expect ( layoutOut . xaxis3 . rangebreaks [ 0 ] . pattern ) . toBe ( undefined , 'not coerce, using *values*' ) ;
1137
1137
} ) ;
1138
1138
} ) ;
@@ -4104,7 +4104,7 @@ describe('Test axes', function() {
4104
4104
_assert ( 'with mixed operation values' , [ 0 , BADNUM , BADNUM , 90 , 100 , BADNUM , BADNUM , 200 ] ) ;
4105
4105
} ) ;
4106
4106
4107
- it ( 'should discard coords within break bounds - date %w case' , function ( ) {
4107
+ it ( 'should discard coords within break bounds - date day of week case' , function ( ) {
4108
4108
var x = [
4109
4109
// Thursday
4110
4110
'2020-01-02 08:00' , '2020-01-02 16:00' ,
@@ -4132,7 +4132,7 @@ describe('Test axes', function() {
4132
4132
_calc ( { x : x } , {
4133
4133
xaxis : {
4134
4134
rangebreaks : [
4135
- { pattern : '%w ' , bounds : [ 6 , 0 ] , operation : '[]' }
4135
+ { pattern : 'day of week ' , bounds : [ 6 , 0 ] , operation : '[]' }
4136
4136
]
4137
4137
}
4138
4138
} ) ;
@@ -4141,7 +4141,7 @@ describe('Test axes', function() {
4141
4141
_calc ( { x : x } , {
4142
4142
xaxis : {
4143
4143
rangebreaks : [
4144
- { pattern : '%w ' , bounds : [ 5 , 1 ] , operation : '()' }
4144
+ { pattern : 'day of week ' , bounds : [ 5 , 1 ] , operation : '()' }
4145
4145
]
4146
4146
}
4147
4147
} ) ;
@@ -4150,7 +4150,7 @@ describe('Test axes', function() {
4150
4150
_calc ( { x : x } , {
4151
4151
xaxis : {
4152
4152
rangebreaks : [
4153
- { pattern : '%w ' , bounds : [ 6 , 1 ] , operation : '[)' }
4153
+ { pattern : 'day of week ' , bounds : [ 6 , 1 ] , operation : '[)' }
4154
4154
]
4155
4155
}
4156
4156
} ) ;
@@ -4159,7 +4159,7 @@ describe('Test axes', function() {
4159
4159
_calc ( { x : x } , {
4160
4160
xaxis : {
4161
4161
rangebreaks : [
4162
- { pattern : '%w ' , bounds : [ 5 , 0 ] , operation : '(]' }
4162
+ { pattern : 'day of week ' , bounds : [ 5 , 0 ] , operation : '(]' }
4163
4163
]
4164
4164
}
4165
4165
} ) ;
@@ -4611,7 +4611,7 @@ describe('Test axes', function() {
4611
4611
} )
4612
4612
. then ( function ( ) {
4613
4613
gd . layout . xaxis . rangebreaks = [
4614
- { pattern : '%w ' , bounds : [ 5 , 1 ] , operation : '()' }
4614
+ { pattern : 'day of week ' , bounds : [ 5 , 1 ] , operation : '()' }
4615
4615
] ;
4616
4616
return Plotly . react ( gd , gd . data , gd . layout ) ;
4617
4617
} )
@@ -4626,7 +4626,7 @@ describe('Test axes', function() {
4626
4626
} )
4627
4627
. then ( function ( ) {
4628
4628
gd . layout . xaxis . rangebreaks = [
4629
- { pattern : '%w ' , bounds : [ 6 , 0 ] , operation : '[]' }
4629
+ { pattern : 'day of week ' , bounds : [ 6 , 0 ] , operation : '[]' }
4630
4630
] ;
4631
4631
return Plotly . react ( gd , gd . data , gd . layout ) ;
4632
4632
} )
@@ -4641,7 +4641,7 @@ describe('Test axes', function() {
4641
4641
} )
4642
4642
. then ( function ( ) {
4643
4643
gd . layout . xaxis . rangebreaks = [
4644
- { pattern : '%w ' , bounds : [ 4 , 6 ] , operation : '()' }
4644
+ { pattern : 'day of week ' , bounds : [ 4 , 6 ] , operation : '()' }
4645
4645
] ;
4646
4646
return Plotly . react ( gd , gd . data , gd . layout ) ;
4647
4647
} )
@@ -4656,7 +4656,7 @@ describe('Test axes', function() {
4656
4656
} )
4657
4657
. then ( function ( ) {
4658
4658
gd . layout . xaxis . rangebreaks = [
4659
- { pattern : '%w ' , bounds : [ 5 , 5 ] , operation : '[]' }
4659
+ { pattern : 'day of week ' , bounds : [ 5 , 5 ] , operation : '[]' }
4660
4660
] ;
4661
4661
return Plotly . react ( gd , gd . data , gd . layout ) ;
4662
4662
} )
@@ -4671,7 +4671,7 @@ describe('Test axes', function() {
4671
4671
} )
4672
4672
. then ( function ( ) {
4673
4673
gd . layout . xaxis . rangebreaks = [
4674
- { pattern : '%w ' , bounds : [ 5 , 5 ] , operation : '()' }
4674
+ { pattern : 'day of week ' , bounds : [ 5 , 5 ] , operation : '()' }
4675
4675
] ;
4676
4676
return Plotly . react ( gd , gd . data , gd . layout ) ;
4677
4677
} )
@@ -4705,7 +4705,7 @@ describe('Test axes', function() {
4705
4705
} )
4706
4706
. then ( function ( ) {
4707
4707
gd . layout . xaxis . rangebreaks = [
4708
- { pattern : '%w ' , bounds : [ 5 , 1 ] , operation : '()' } ,
4708
+ { pattern : 'day of week ' , bounds : [ 5 , 1 ] , operation : '()' } ,
4709
4709
{ pattern : '%H' , bounds : [ 17 , 8 ] , operation : '()' }
4710
4710
] ;
4711
4711
return Plotly . react ( gd , gd . data , gd . layout ) ;
@@ -4729,7 +4729,7 @@ describe('Test axes', function() {
4729
4729
. then ( function ( ) {
4730
4730
gd . layout . xaxis . rangebreaks = [
4731
4731
{ pattern : '%H' , bounds : [ 17 , 8 ] , operation : '()' } ,
4732
- { pattern : '%w ' , bounds : [ 5 , 1 ] , operation : '()' }
4732
+ { pattern : 'day of week ' , bounds : [ 5 , 1 ] , operation : '()' }
4733
4733
] ;
4734
4734
return Plotly . react ( gd , gd . data , gd . layout ) ;
4735
4735
} )
@@ -4772,15 +4772,15 @@ describe('Test axes', function() {
4772
4772
} )
4773
4773
. then ( function ( ) {
4774
4774
gd . layout . xaxis . rangebreaks = [
4775
- { pattern : '%w ' , bounds : [ 1 , 4 ] , operation : '()' }
4775
+ { pattern : 'day of week ' , bounds : [ 1 , 4 ] , operation : '()' }
4776
4776
] ;
4777
4777
// N.B. xaxis.range[0] falls within a break
4778
4778
gd . layout . xaxis . autorange = false ;
4779
4779
gd . layout . xaxis . range = [ '2020-01-01' , '2020-01-09' ] ;
4780
4780
return Plotly . react ( gd , gd . data , gd . layout ) ;
4781
4781
} )
4782
4782
. then ( function ( ) {
4783
- _assert ( 'when range[0] falls within a break pattern (%w case)' , 'x' , {
4783
+ _assert ( 'when range[0] falls within a break pattern (day of week case)' , 'x' , {
4784
4784
rangebreaks : [
4785
4785
[ '2020-01-01 00:00:00' , '2020-01-02 00:00:00' ] . map ( Lib . dateTime2ms ) ,
4786
4786
[ '2020-01-07 00:00:00' , '2020-01-09 00:00:00' ] . map ( Lib . dateTime2ms )
0 commit comments