@@ -223,14 +223,16 @@ export abstract class D3VisualizationBuilderService<
223223 const isLegendVisible = this . isLegendVisible ( config ) ;
224224 const isTopOrBottomLegend = this . isTopOrBottomLegend ( config ) ;
225225 const isSideLegend = config . legend === LegendPosition . Right ;
226- let legendWidth = isLegendVisible ? 0
226+ let legendWidth = isLegendVisible
227+ ? 0
227228 : isSideLegend
228229 ? Math . min ( legendRect . width , this . getMaxLegendWidth ( ) )
229230 : isTopOrBottomLegend
230231 ? outerRect . width
231232 : 0 ;
232233
233- let legendHeight = isLegendVisible ? 0
234+ let legendHeight = isLegendVisible
235+ ? 0
234236 : isTopOrBottomLegend
235237 ? Math . min ( legendRect . height , this . getMaxLegendHeight ( ) )
236238 : isSideLegend
@@ -244,13 +246,13 @@ export abstract class D3VisualizationBuilderService<
244246 let vizHeight = outerRect . height - legendHeightOffset ;
245247
246248 // Hide Legend if less space is available for the viz
247- if ( vizWidth <= legendWidthOffset || legendWidth <= 60 ) {
248- vizWidth = outerRect . width
249+ if ( vizWidth <= legendWidthOffset || legendWidth <= 60 ) {
250+ vizWidth = outerRect . width ;
249251 legendWidth = 0 ;
250252 }
251253
252- if ( vizHeight <= legendHeightOffset || legendHeight <= 12 ) {
253- vizHeight = outerRect . height
254+ if ( vizHeight <= legendHeightOffset || legendHeight <= 12 ) {
255+ vizHeight = outerRect . height ;
254256 legendHeight = 0 ;
255257 }
256258
@@ -264,7 +266,7 @@ export abstract class D3VisualizationBuilderService<
264266
265267 private isLegendVisible ( config : ChartConfig ) : boolean {
266268 return config . legend === LegendPosition . None ;
267- }
269+ }
268270
269271 private isTopOrBottomLegend ( config : ChartConfig ) : boolean {
270272 switch ( config . legend ) {
0 commit comments