File tree 3 files changed +39
-10
lines changed
3 files changed +39
-10
lines changed Original file line number Diff line number Diff line change 5
5
"x" : [
6
6
" A" ,
7
7
" B" ,
8
- " C"
8
+ " C" ,
9
+ " D"
9
10
],
10
11
"y" : [
11
12
0 ,
12
13
null ,
14
+ 0.001 ,
13
15
1
14
16
],
15
17
"text" : [
16
18
0 ,
17
19
null ,
20
+ 0.001 ,
18
21
1
19
22
],
20
23
"textposition" : " auto" ,
26
29
"x" : [
27
30
" A" ,
28
31
" B" ,
29
- " C"
32
+ " C" ,
33
+ " D"
30
34
],
31
35
"y" : [
32
36
0 ,
33
37
null ,
38
+ 0.001 ,
34
39
1
35
40
],
36
41
"text" : [
37
42
0 ,
38
43
null ,
44
+ 0.001 ,
39
45
1
40
46
],
41
47
"textposition" : " auto" ,
50
56
"x" : [
51
57
0 ,
52
58
null ,
59
+ 0.001 ,
53
60
1
54
61
],
55
62
"y" : [
56
63
" A" ,
57
64
" B" ,
58
- " C"
65
+ " C" ,
66
+ " D"
59
67
],
60
68
"text" : [
61
69
0 ,
62
70
null ,
71
+ 0.001 ,
63
72
1
64
73
],
65
74
"textposition" : " auto" ,
74
83
"x" : [
75
84
0 ,
76
85
null ,
86
+ 0.001 ,
77
87
1
78
88
],
79
89
"y" : [
80
90
" A" ,
81
91
" B" ,
82
- " C"
92
+ " C" ,
93
+ " D"
83
94
],
84
95
"text" : [
85
96
0 ,
86
97
null ,
98
+ 0.001 ,
87
99
1
88
100
],
89
101
"textposition" : " auto" ,
94
106
}
95
107
],
96
108
"layout" : {
97
- "showlegend" : true ,
109
+ "showlegend" : false ,
98
110
"width" : 800 ,
99
111
"height" : 800 ,
100
112
"dragmode" : " pan" ,
Original file line number Diff line number Diff line change @@ -2041,19 +2041,36 @@ describe('A bar plot', function() {
2041
2041
dy -= + pos [ 2 ] ;
2042
2042
dx -= + pos [ 3 ] ;
2043
2043
2044
- return dx * dy ;
2044
+ return Math . abs ( dx * dy ) ;
2045
2045
}
2046
2046
2047
2047
Plotly . plot ( gd , mock )
2048
2048
. then ( function ( ) {
2049
2049
var nodes = gd . querySelectorAll ( 'g.point > path' ) ;
2050
- expect ( nodes . length ) . toBe ( 12 , '# of bars' ) ;
2050
+ expect ( nodes . length ) . toBe ( 16 , '# of bars' ) ;
2051
2051
2052
2052
[
2053
- 0 , 1 , 3 , 4 , 6 , 7 , 9 , 10
2054
- ] . forEach ( function ( i ) {
2053
+ [ 0 , false ] ,
2054
+ [ 1 , false ] ,
2055
+ [ 2 , true ] ,
2056
+ [ 3 , true ] ,
2057
+ [ 4 , false ] ,
2058
+ [ 5 , false ] ,
2059
+ [ 6 , true ] ,
2060
+ [ 7 , true ] ,
2061
+ [ 8 , false ] ,
2062
+ [ 9 , false ] ,
2063
+ [ 10 , true ] ,
2064
+ [ 11 , true ] ,
2065
+ [ 12 , false ] ,
2066
+ [ 13 , false ] ,
2067
+ [ 14 , true ] ,
2068
+ [ 15 , true ]
2069
+ ] . forEach ( function ( e ) {
2070
+ var i = e [ 0 ] ;
2055
2071
var d = nodes [ i ] . getAttribute ( 'd' ) ;
2056
- expect ( getArea ( d ) ) . toBe ( 0 , 'item:' + i ) ;
2072
+ var visible = e [ 1 ] ;
2073
+ expect ( getArea ( d ) > 0 ) . toBe ( visible , 'item:' + i ) ;
2057
2074
} ) ;
2058
2075
} )
2059
2076
. catch ( failTest )
You can’t perform that action at this time.
0 commit comments