File tree 1 file changed +16
-15
lines changed
Filter options
1 file changed +16
-15
lines changed
Original file line number Diff line number Diff line change @@ -882,36 +882,37 @@ describe('calculated data and points', function() {
882
882
return t . categories . length && t . categories . indexOf ( 'cartesian' ) !== - 1 ;
883
883
} ) ;
884
884
885
- var cartesianTraceNames = cartesianTraces . map ( function ( t ) {
886
- return t . type ;
887
- } ) ;
888
-
889
- for ( i = 0 ; i < cartesianTraceNames . length ; i ++ ) {
890
- var type = cartesianTraceNames [ i ] ;
885
+ for ( i = 0 ; i < cartesianTraces . length ; i ++ ) {
886
+ var type = cartesianTraces [ i ] . type ;
891
887
if ( type === 'scattergl' ) continue ;
892
888
if ( type === 'carpet' ) continue ;
893
889
if ( type === 'contourcarpet' ) continue ;
894
890
891
+ var data = [ 7 , 2 , 3 , 7 ] ;
892
+ var cat = [ 'a' , 'b' , 'c' , 'a' ] ;
895
893
Plotly . newPlot ( gd , {
896
894
data : [ {
897
895
type : type ,
898
- x : [ 'a' , 'b' , 'c' , 'a' ] ,
899
- a : [ 'a' , 'b' , 'c' , 'a' ] ,
900
- b : [ 7 , 3 , 2 , 7 ] ,
901
- y : [ 7 , 3 , 2 , 7 ] ,
902
- z : [ 7 , 3 , 2 , 7 ] ,
896
+ x : cat ,
897
+ a : cat ,
898
+ b : data ,
899
+ y : data ,
900
+ z : data ,
903
901
// For OHLC
904
- open : [ 7 , 3 , 2 , 7 ] ,
905
- close : [ 7 , 3 , 2 , 7 ] ,
906
- high : [ 7 , 3 , 2 , 7 ] ,
907
- low : [ 7 , 3 , 2 , 7 ]
902
+ open : data ,
903
+ close : data ,
904
+ high : data ,
905
+ low : data
908
906
} ] ,
909
907
layout : {
910
908
xaxis : {
911
909
type : 'category' ,
912
910
categoryorder : 'value ascending'
913
911
}
914
912
}
913
+ } )
914
+ . then ( function ( gd ) {
915
+ expect ( gd . _fullLayout . xaxis . _categories ) . toEqual ( [ 'b' , 'c' , 'a' ] ) ;
915
916
} ) ;
916
917
}
917
918
} ) ;
You can’t perform that action at this time.
0 commit comments