@@ -304,16 +304,16 @@ describe('finance charts calc transforms:', function() {
304
304
var out = _calc ( [ trace0 , trace1 ] ) ;
305
305
306
306
expect ( out [ 0 ] . x ) . toEqual ( [
307
- - 0.05 , 0 , 0 , 0 , 0 , 0.05 , null ,
308
- 2.95 , 3 , 3 , 3 , 3 , 3.05 , null ,
309
- 4.95 , 5 , 5 , 5 , 5 , 5.05 , null ,
310
- 6.95 , 7 , 7 , 7 , 7 , 7.05 , null
307
+ - 0.1 , 0 , 0 , 0 , 0 , 0.1 , null ,
308
+ 2.9 , 3 , 3 , 3 , 3 , 3.1 , null ,
309
+ 4.9 , 5 , 5 , 5 , 5 , 5.1 , null ,
310
+ 6.9 , 7 , 7 , 7 , 7 , 7.1 , null
311
311
] ) ;
312
312
expect ( out [ 1 ] . x ) . toEqual ( [
313
- 0.95 , 1 , 1 , 1 , 1 , 1.05 , null ,
314
- 1.95 , 2 , 2 , 2 , 2 , 2.05 , null ,
315
- 3.95 , 4 , 4 , 4 , 4 , 4.05 , null ,
316
- 5.95 , 6 , 6 , 6 , 6 , 6.05 , null
313
+ 0.9 , 1 , 1 , 1 , 1 , 1.1 , null ,
314
+ 1.9 , 2 , 2 , 2 , 2 , 2.1 , null ,
315
+ 3.9 , 4 , 4 , 4 , 4 , 4.1 , null ,
316
+ 5.9 , 6 , 6 , 6 , 6 , 6.1 , null
317
317
] ) ;
318
318
expect ( out [ 2 ] . x ) . toEqual ( [
319
319
0 , 0 , 0 , 0 , 0 , 0 ,
@@ -384,6 +384,7 @@ describe('finance charts calc transforms:', function() {
384
384
it ( 'should work with *filter* transforms' , function ( ) {
385
385
var trace0 = Lib . extendDeep ( { } , mock1 , {
386
386
type : 'ohlc' ,
387
+ tickwidth : 0.05 ,
387
388
transforms : [ {
388
389
type : 'filter' ,
389
390
operation : '>' ,
@@ -450,6 +451,7 @@ describe('finance charts calc transforms:', function() {
450
451
451
452
var trace0 = Lib . extendDeep ( { } , mock1 , {
452
453
type : 'ohlc' ,
454
+ tickwidth : 0.05 ,
453
455
transforms : [ opts ]
454
456
} ) ;
455
457
@@ -561,7 +563,7 @@ describe('finance charts updates:', function() {
561
563
var path0 ;
562
564
563
565
Plotly . plot ( gd , [ trace0 ] ) . then ( function ( ) {
564
- expect ( gd . calcdata [ 0 ] [ 0 ] . x ) . toEqual ( - 0.05 ) ;
566
+ expect ( gd . calcdata [ 0 ] [ 0 ] . x ) . toEqual ( - 0.1 ) ;
565
567
expect ( gd . calcdata [ 0 ] [ 0 ] . y ) . toEqual ( 33.01 ) ;
566
568
567
569
return Plotly . restyle ( gd , 'tickwidth' , 0.5 ) ;
0 commit comments