Skip to content

Commit f6d430b

Browse files
committed
Include intial 10px padding on legend
1 parent 68848e4 commit f6d430b

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
@@ -654,13 +654,13 @@ function computeLegendDimensions(gd, groups, traces) {
654654

655655
Drawing.setTranslate(this,
656656
0,
657-
(5 + borderwidth + textHeight / 2) + groupHeight);
657+
(5 + borderwidth + groupHeight + textHeight / 2));
658658

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

663-
opts._height = (borderwidth * 2) + (rowNum * maxHeight);
663+
opts._height = 10 + (borderwidth * 2) + (rowNum * maxHeight) + ((rowNum - 1) * traceGap);
664664

665665
var maxOffset = Math.max.apply(null, groupXOffsets);
666666
opts._width = maxOffset + maxWidth + 40;
-3.86 KB
Loading
Loading

0 commit comments

Comments
 (0)