Skip to content

Commit 3edc9eb

Browse files
committed
Remove extra height from horizontal grouped legends
1 parent 737150b commit 3edc9eb

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/components/legend/draw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,13 +653,13 @@ function computeLegendDimensions(gd, groups, traces) {
653653

654654
Drawing.setTranslate(this,
655655
0,
656-
(5 + borderwidth + groupHeight + textHeight / 2));
656+
(5 + borderwidth + groupHeight));
657657

658658
groupHeight += textHeight;
659659
});
660660
});
661661

662-
opts._height += (borderwidth * 2) + (rowNum * maxHeight);
662+
opts._height = (borderwidth * 2) + (rowNum * maxHeight);
663663

664664
var maxOffset = Math.max.apply(null, groupXOffsets);
665665
opts._width = maxOffset + maxWidth + 40;
-260 Bytes
Loading
Loading

0 commit comments

Comments
 (0)