@@ -143,7 +143,6 @@ function computeStaticLegendLayout(config: StaticLegendConfig): StaticLegendMetr
143143 theme,
144144 position = "right" ,
145145 totalWidth,
146- totalHeight,
147146 margin,
148147 legendLayout,
149148 } = config
@@ -152,7 +151,6 @@ function computeStaticLegendLayout(config: StaticLegendConfig): StaticLegendMetr
152151 const swatchRadius = 0
153152 const isHorizontal = position === "top" || position === "bottom"
154153 const plotWidth = Math . max ( swatchSize , totalWidth - margin . left - margin . right )
155- const plotHeight = Math . max ( rowHeight , totalHeight - margin . top - margin . bottom )
156154 const widths = categories . map ( ( category ) => itemWidth ( category , swatchSize , labelGap , theme ) )
157155
158156 if ( isHorizontal ) {
@@ -224,16 +222,15 @@ export function measureStaticLegend(config: StaticLegendConfig): Omit<StaticLege
224222}
225223
226224function computeStaticLegendGroupsLayout ( config : StaticLegendGroupsConfig ) : StaticLegendGroupMetrics {
227- const { legendGroups, theme, position = "right" , totalWidth, totalHeight , margin, legendLayout } = config
228- const { swatchSize, labelGap, itemGap , rowHeight } = resolveLegendMetrics ( legendLayout )
225+ const { legendGroups, theme, position = "right" , totalWidth, margin, legendLayout } = config
226+ const { swatchSize, labelGap, rowHeight } = resolveLegendMetrics ( legendLayout )
229227 const labelOffset = swatchSize + labelGap
230228 const swatchRadius = 0
231229 const groupLabelSize = Math . max ( 12 , legendFontSize ( theme ) )
232230 const labelPadding = 8
233231 const separatorGap = 12
234232 const isHorizontal = position === "top" || position === "bottom"
235233 const plotWidth = Math . max ( swatchSize , totalWidth - margin . left - margin . right )
236- const plotHeight = Math . max ( rowHeight , totalHeight - margin . top - margin . bottom )
237234
238235 if ( isHorizontal ) {
239236 const maxWidth = Math . max ( swatchSize , legendLayout ?. maxWidth ?? plotWidth )
0 commit comments