Skip to content

Commit a2befea

Browse files
committed
fix variable declaration
1 parent 98356b4 commit a2befea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/traces/bar/plot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,13 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
282282
var lyFunc = null;
283283
// Default rectangular path (used if no rounding)
284284
var rectanglePath = 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z';
285+
var overhead = 0;
285286
if(r && di.s) {
286287
// Bar has cornerradius, and nonzero size
287288
// Check amount of 'overhead' (bars stacked above this one)
288289
// to see whether we need to round or not
289290
var refPoint = sign(di.s0) === 0 || sign(di.s) === sign(di.s0) ? di.s1 : di.s0;
290-
var overhead = fixpx(!di.hasB ? Math.abs(c2p(outerBound, true) - c2p(refPoint, true)) : 0);
291+
overhead = fixpx(!di.hasB ? Math.abs(c2p(outerBound, true) - c2p(refPoint, true)) : 0);
291292
if(overhead < r) {
292293
// Calculate parameters for rounded corners
293294
var xdir = dirSign(x0, x1);

0 commit comments

Comments
 (0)