Skip to content

Commit b25467b

Browse files
committed
bar: do not normalise bars with no size
1 parent c61e642 commit b25467b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/traces/bar/set_positions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,11 @@ function normalizeBars(gd, sa, sieve) {
309309
var trace = traces[i];
310310

311311
for(var j = 0; j < trace.length; j++) {
312-
var bar = trace[j],
313-
scale = Math.abs(sTop / sieve.get(bar.p, bar.s));
312+
var bar = trace[j];
313+
314+
if(!isNumeric(bar.s)) continue;
314315

316+
var scale = Math.abs(sTop / sieve.get(bar.p, bar.s));
315317
bar.b *= scale;
316318
bar.s *= scale;
317319
var barEnd = bar.b + bar.s;

0 commit comments

Comments
 (0)