Skip to content

Commit 495d036

Browse files
committed
bar: properly transition to blank bars
1 parent bda810f commit 495d036

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/traces/bar/plot.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
204204
var sel = transition(Lib.ensureSingle(bar, 'path'), opts, makeOnCompleteCallback);
205205
sel
206206
.style('vector-effect', 'non-scaling-stroke')
207-
.attr('display', function() { return isBlank ? 'none' : null;})
207+
.attr('display', function() {
208+
if(!isBlank) return null;
209+
if(isBlank && !hasTransition(opts)) return 'none';
210+
})
208211
.attr('d', 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z')
209212
.call(Drawing.setClipUrl, plotinfo.layerClipId, gd);
210213

0 commit comments

Comments
 (0)