Skip to content

Commit 315c888

Browse files
committed
Fix logic for adding a gap between bars
1 parent 724c83f commit 315c888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/bar/layout_defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function(layoutIn, layoutOut, fullData) {
3737
// with other barmodes bars are grouped next to each other when sharing the same axes
3838
// and using different offsetgroups
3939
subploti += trace._input.offsetgroup;
40-
if(!usedSubplots[subploti]) gappedAnyway = true;
40+
if(usedSubplots.length > 0 && !usedSubplots[subploti]) gappedAnyway = true;
4141
usedSubplots[subploti] = true;
4242
}
4343

0 commit comments

Comments
 (0)