@@ -95,10 +95,8 @@ scatter.supplyDefaults = function(traceIn, traceOut, defaultColor, layout) {
9595 if ( ! scatter . hasLines ( traceOut ) ) lineShapeDefaults ( traceIn , traceOut , coerce ) ;
9696 }
9797
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' } ) ;
102100} ;
103101
104102// common to 'scatter', 'scatter3d', 'scattergeo' and 'scattergl'
@@ -367,13 +365,10 @@ scatter.calc = function(gd, trace) {
367365 }
368366
369367 // 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+ ) ) {
377372 xOptions . padded = false ;
378373 xOptions . ppad = 0 ;
379374 }
@@ -909,7 +904,7 @@ scatter.hoverPoints = function(pointData, xval, yval, hovermode) {
909904 if ( di . tx ) pointData . text = di . tx ;
910905 else if ( trace . text ) pointData . text = trace . text ;
911906
912- if ( Plotly . ErrorBars ) Plotly . ErrorBars . hoverInfo ( di , trace , pointData ) ;
907+ Plotly . ErrorBars . hoverInfo ( di , trace , pointData ) ;
913908
914909 return [ pointData ] ;
915910} ;
0 commit comments