Skip to content

Commit

Permalink
Added minimum height for maps
Browse files Browse the repository at this point in the history
  • Loading branch information
LKMason committed Feb 8, 2024
1 parent 139ab03 commit 9c21983
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/mapPlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export function plotMortalityMapGrid(container, legendContainer, mortalityData,
valueFormat: null,
prepareDataForDownload: d => d,
measureLabel: null,
minMapHeight: 550,
...options
}

Expand Down Expand Up @@ -193,7 +194,8 @@ export function plotMortalityMapGrid(container, legendContainer, mortalityData,

const bbox = mapsContainer.getBoundingClientRect()
const mapWidth = 0.9 * bbox.width / nColumns
const mapHeight = 0.9 * bbox.height
const mapHeight = Math.max(0.9 * bbox.height, options.minMapHeight)
console.log(mapHeight)

const mean = d3.mean(mortalityData, d => d[options.measureField])
const domain = d3.extent(mortalityData, d => d[options.measureField])
Expand Down

0 comments on commit 9c21983

Please sign in to comment.