Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37debb6

Browse files
committed
fix issue 4631 - bypass NaN positions
1 parent 9a611b3 commit 37debb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/bar/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
242242
var sel = transition(Lib.ensureSingle(bar, 'path'), fullLayout, opts, makeOnCompleteCallback);
243243
sel
244244
.style('vector-effect', 'non-scaling-stroke')
245-
.attr('d', 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z')
245+
.attr('d', isNaN((x1 - x0) * (y1 - y0)) ? 'M0,0Z' : 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z')
246246
.call(Drawing.setClipUrl, plotinfo.layerClipId, gd);
247247

248248
if(!fullLayout.uniformtext.mode && withTransition) {

0 commit comments

Comments
 (0)