@@ -95,10 +95,8 @@ scatter.supplyDefaults = function(traceIn, traceOut, defaultColor, layout) {
95
95
if ( ! scatter . hasLines ( traceOut ) ) lineShapeDefaults ( traceIn , traceOut , coerce ) ;
96
96
}
97
97
98
- if ( Plotly . ErrorBars ) {
99
- Plotly . ErrorBars . supplyDefaults ( traceIn , traceOut , defaultColor , { axis : 'y' } ) ;
100
- Plotly . ErrorBars . supplyDefaults ( traceIn , traceOut , defaultColor , { axis : 'x' , inherit : 'y' } ) ;
101
- }
98
+ Plotly . ErrorBars . supplyDefaults ( traceIn , traceOut , defaultColor , { axis : 'y' } ) ;
99
+ Plotly . ErrorBars . supplyDefaults ( traceIn , traceOut , defaultColor , { axis : 'x' , inherit : 'y' } ) ;
102
100
} ;
103
101
104
102
// common to 'scatter', 'scatter3d', 'scattergeo' and 'scattergl'
@@ -367,13 +365,10 @@ scatter.calc = function(gd, trace) {
367
365
}
368
366
369
367
// if no error bars, markers or text, or fill to y=0 remove x padding
370
- else if (
371
- ( Plotly . ErrorBars === undefined || ! trace . error_y . visible ) &&
372
- (
373
- [ 'tonexty' , 'tozeroy' ] . indexOf ( trace . fill ) !== - 1 ||
374
- ( ! scatter . hasMarkers ( trace ) && ! scatter . hasText ( trace ) )
375
- )
376
- ) {
368
+ else if ( ! trace . error_y . visible && (
369
+ [ 'tonexty' , 'tozeroy' ] . indexOf ( trace . fill ) !== - 1 ||
370
+ ( ! scatter . hasMarkers ( trace ) && ! scatter . hasText ( trace ) )
371
+ ) ) {
377
372
xOptions . padded = false ;
378
373
xOptions . ppad = 0 ;
379
374
}
@@ -909,7 +904,7 @@ scatter.hoverPoints = function(pointData, xval, yval, hovermode) {
909
904
if ( di . tx ) pointData . text = di . tx ;
910
905
else if ( trace . text ) pointData . text = trace . text ;
911
906
912
- if ( Plotly . ErrorBars ) Plotly . ErrorBars . hoverInfo ( di , trace , pointData ) ;
907
+ Plotly . ErrorBars . hoverInfo ( di , trace , pointData ) ;
913
908
914
909
return [ pointData ] ;
915
910
} ;
0 commit comments