@@ -122,11 +122,11 @@ describe('Test gl3d plots', function() {
122
122
. then ( _hover )
123
123
. then ( delay ( 20 ) )
124
124
. then ( function ( ) {
125
- assertHoverText ( 'x: 140.72 ' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
126
- assertEventData ( 140.72 , - 96.97 , - 96.97 , 0 , 2 , {
127
- 'marker.symbol' : 'cross' ,
128
- 'marker.size' : 30 ,
129
- 'marker.color' : 'orange ' ,
125
+ assertHoverText ( 'x: 134.03 ' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
126
+ assertEventData ( 134.03 , - 163.59 , - 163.59 , 0 , 3 , {
127
+ 'marker.symbol' : undefined ,
128
+ 'marker.size' : 40 ,
129
+ 'marker.color' : 'black ' ,
130
130
'marker.line.color' : undefined
131
131
} ) ;
132
132
assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
@@ -143,15 +143,15 @@ describe('Test gl3d plots', function() {
143
143
} )
144
144
. then ( _hover )
145
145
. then ( function ( ) {
146
- assertHoverText ( 'x: Jan 1, 2017' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
146
+ assertHoverText ( 'x: Feb 1, 2017' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
147
147
148
148
return Plotly . restyle ( gd , {
149
149
x : [ [ new Date ( 2017 , 2 , 1 ) , new Date ( 2017 , 2 , 2 ) , new Date ( 2017 , 2 , 3 ) , new Date ( 2017 , 2 , 4 ) ] ]
150
150
} ) ;
151
151
} )
152
152
. then ( _hover )
153
153
. then ( function ( ) {
154
- assertHoverText ( 'x: Mar 3 , 2017' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
154
+ assertHoverText ( 'x: Mar 4 , 2017' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
155
155
156
156
return Plotly . update ( gd , {
157
157
y : [ [ 'a' , 'b' , 'c' , 'd' ] ] ,
@@ -162,25 +162,25 @@ describe('Test gl3d plots', function() {
162
162
} )
163
163
. then ( _hover )
164
164
. then ( function ( ) {
165
- assertHoverText ( 'x: Mar 3 , 2017' , 'y: c ' , 'z: 100k ' ) ;
165
+ assertHoverText ( 'x: Mar 4 , 2017' , 'y: d ' , 'z: 10B ' ) ;
166
166
167
167
return Plotly . relayout ( gd , 'scene.xaxis.calendar' , 'chinese' ) ;
168
168
} )
169
169
. then ( _hover )
170
170
. then ( function ( ) {
171
- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' ) ;
171
+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' ) ;
172
172
173
173
return Plotly . restyle ( gd , 'text' , [ [ 'A' , 'B' , 'C' , 'D' ] ] ) ;
174
174
} )
175
175
. then ( _hover )
176
176
. then ( function ( ) {
177
- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'C ' ) ;
177
+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'D ' ) ;
178
178
179
179
return Plotly . restyle ( gd , 'hovertext' , [ [ 'Apple' , 'Banana' , 'Clementine' , 'Dragon fruit' ] ] ) ;
180
180
} )
181
181
. then ( _hover )
182
182
. then ( function ( ) {
183
- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'Clementine ' ) ;
183
+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'Dragon fruit ' ) ;
184
184
185
185
return Plotly . restyle ( gd , {
186
186
'hoverlabel.bgcolor' : [ [ 'red' , 'blue' , 'green' , 'yellow' ] ] ,
@@ -190,11 +190,11 @@ describe('Test gl3d plots', function() {
190
190
. then ( _hover )
191
191
. then ( function ( ) {
192
192
assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
193
- bgcolor : 'rgb(0, 128 , 0)' ,
194
- bordercolor : 'rgb(255, 255, 255 )' ,
193
+ bgcolor : 'rgb(255, 255 , 0)' ,
194
+ bordercolor : 'rgb(68, 68, 68 )' ,
195
195
fontSize : 20 ,
196
196
fontFamily : 'Arial' ,
197
- fontColor : 'rgb(255, 255, 255 )'
197
+ fontColor : 'rgb(68, 68, 68 )'
198
198
} , 'restyled' ) ;
199
199
200
200
return Plotly . relayout ( gd , {
@@ -206,7 +206,7 @@ describe('Test gl3d plots', function() {
206
206
. then ( _hover )
207
207
. then ( function ( ) {
208
208
assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
209
- bgcolor : 'rgb(0, 128 , 0)' ,
209
+ bgcolor : 'rgb(255, 255 , 0)' ,
210
210
bordercolor : 'rgb(255, 255, 0)' ,
211
211
fontSize : 20 ,
212
212
fontFamily : 'Roboto' ,
@@ -220,18 +220,18 @@ describe('Test gl3d plots', function() {
220
220
var label = d3 . selectAll ( 'g.hovertext' ) ;
221
221
222
222
expect ( label . size ( ) ) . toEqual ( 1 ) ;
223
- expect ( label . select ( 'text' ) . text ( ) ) . toEqual ( 'c ' ) ;
223
+ expect ( label . select ( 'text' ) . text ( ) ) . toEqual ( 'x: 二 7, 2017y: dz: 10BDragon fruit ' ) ;
224
224
225
225
return Plotly . restyle ( gd , 'hoverinfo' , [ [ null , null , 'dont+know' , null ] ] ) ;
226
226
} )
227
227
. then ( _hover )
228
228
. then ( function ( ) {
229
- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'Clementine ' ) ;
229
+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'Dragon fruit ' ) ;
230
230
231
231
return Plotly . restyle ( gd , 'hoverinfo' , 'text' ) ;
232
232
} )
233
233
. then ( function ( ) {
234
- assertHoverText ( null , null , null , 'Clementine ' ) ;
234
+ assertHoverText ( null , null , null , 'Dragon fruit ' ) ;
235
235
236
236
return Plotly . restyle ( gd , 'hovertext' , 'HEY' ) ;
237
237
} )
@@ -241,12 +241,12 @@ describe('Test gl3d plots', function() {
241
241
return Plotly . restyle ( gd , 'hoverinfo' , 'z' ) ;
242
242
} )
243
243
. then ( function ( ) {
244
- assertHoverText ( null , null , '100k ' ) ;
244
+ assertHoverText ( null , null , '10B ' ) ;
245
245
246
246
return Plotly . restyle ( gd , 'hovertemplate' , 'THIS Y -- %{y}<extra></extra>' ) ;
247
247
} )
248
248
. then ( function ( ) {
249
- assertHoverText ( null , null , null , 'THIS Y -- c ' ) ;
249
+ assertHoverText ( null , null , null , 'THIS Y -- d ' ) ;
250
250
} )
251
251
. catch ( failTest )
252
252
. then ( done ) ;
0 commit comments