@@ -114,6 +114,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
114
114
}
115
115
116
116
var isHorizontal = ( trace . orientation === 'h' ) ;
117
+ var withTransition = hasTransition ( opts ) ;
117
118
118
119
var pointGroup = Lib . ensureSingle ( plotGroup , 'g' , 'points' ) ;
119
120
@@ -156,6 +157,14 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
156
157
}
157
158
di . isBlank = isBlank ;
158
159
160
+ if ( isBlank && withTransition ) {
161
+ if ( isHorizontal ) {
162
+ x1 = x0 ;
163
+ } else {
164
+ y1 = y0 ;
165
+ }
166
+ }
167
+
159
168
// in waterfall mode `between` we need to adjust bar end points to match the connector width
160
169
if ( adjustPixel && ! isBlank ) {
161
170
if ( isHorizontal ) {
@@ -231,7 +240,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
231
240
. attr ( 'd' , 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z' )
232
241
. call ( Drawing . setClipUrl , plotinfo . layerClipId , gd ) ;
233
242
234
- if ( ! fullLayout . uniformtext . mode && hasTransition ( opts ) ) {
243
+ if ( ! fullLayout . uniformtext . mode && withTransition ) {
235
244
var styleFns = Drawing . makePointStyleFns ( trace ) ;
236
245
Drawing . singlePointStyle ( di , sel , trace , styleFns , gd ) ;
237
246
}
0 commit comments