Skip to content

Commit

Permalink
Fix plots tab cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
leexgh committed May 30, 2022
1 parent b4759e6 commit 35789ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shared/components/plots/PlotUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function getBottomLegendHeight(
const numRows = Math.ceil(legendData.length / legendItemsPerRow);
let itemsHeight =
Math.max(...legendData.map(getLegendDataHeight)) * numRows;
// add room for between rows
itemsHeight += 20 * (numRows - 1);
// add room around rows
itemsHeight += 10 * numRows;

let titleHeight = 0;
if (_legendTitle) {
Expand All @@ -69,8 +69,8 @@ export function getBottomLegendHeight(
CBIOPORTAL_VICTORY_THEME.legend.style.title.fontSize + 'px'
)
);
// add room for between lines
titleHeight += 10 * (legendTitle.length - 1);
// add room around lines
titleHeight += 10 * legendTitle.length;
}

return Math.max(itemsHeight, titleHeight);
Expand Down

0 comments on commit 35789ce

Please sign in to comment.