@@ -37,7 +37,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
3737 coerce ( 'hovertext' ) ;
3838 coerce ( 'hovertemplate' ) ;
3939
40- handleText ( traceIn , traceOut , layout , coerce ) ;
40+ handleText ( traceIn , traceOut , layout , coerce , true ) ;
4141
4242 handleStyleDefaults ( traceIn , traceOut , coerce , defaultColor , layout ) ;
4343
@@ -109,10 +109,9 @@ function crossTraceDefaults(fullData, fullLayout) {
109109 }
110110}
111111
112- function handleText ( traceIn , traceOut , layout , coerce ) {
112+ function handleText ( traceIn , traceOut , layout , coerce , moduleHasSelUnselected ) {
113113
114114 var textPosition = coerce ( 'textposition' ) ;
115-
116115 var hasBoth = Array . isArray ( textPosition ) || textPosition === 'auto' ;
117116 var hasInside = hasBoth || textPosition === 'inside' ;
118117 var hasOutside = hasBoth || textPosition === 'outside' ;
@@ -137,8 +136,12 @@ function handleText(traceIn, traceOut, layout, coerce) {
137136 if ( hasOutside ) coerceFont ( coerce , 'outsidetextfont' , textFont ) ;
138137
139138 coerce ( 'constraintext' ) ;
140- coerce ( 'selected.textfont.color' ) ;
141- coerce ( 'unselected.textfont.color' ) ;
139+
140+ if ( moduleHasSelUnselected ) {
141+ coerce ( 'selected.textfont.color' ) ;
142+ coerce ( 'unselected.textfont.color' ) ;
143+ }
144+
142145 coerce ( 'cliponaxis' ) ;
143146 }
144147}
0 commit comments