File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
projects/observability/src/shared/components Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -68,5 +68,6 @@ export const enum LegendPosition {
6868 TopRight = 'top-right' ,
6969 TopLeft = 'top-left' ,
7070 Top = 'top' ,
71+ Left = 'left' ,
7172 None = 'none'
7273}
Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ export abstract class D3VisualizationBuilderService<
117117 return 'column-reverse' ;
118118 case LegendPosition . Right :
119119 return 'row' ;
120+ case LegendPosition . Left :
121+ return 'row-reverse' ;
120122 case LegendPosition . None :
121123 return '' ;
122124 default :
@@ -222,7 +224,7 @@ export abstract class D3VisualizationBuilderService<
222224
223225 const isLegendVisible = this . isLegendVisible ( config ) ;
224226 const isTopOrBottomLegend = this . isTopOrBottomLegend ( config ) ;
225- const isSideLegend = config . legend === LegendPosition . Right ;
227+ const isSideLegend = config . legend === LegendPosition . Right || config . legend === LegendPosition . Left ;
226228 let legendWidth = isLegendVisible
227229 ? 0
228230 : isSideLegend
@@ -312,6 +314,7 @@ export abstract class D3VisualizationBuilderService<
312314 protected getLegendLayout ( configuration : TInternalConfig ) : LegendLayout {
313315 switch ( configuration . legend ) {
314316 case LegendPosition . Right :
317+ case LegendPosition . Left :
315318 return LegendLayout . Column ;
316319 case LegendPosition . Top :
317320 case LegendPosition . TopRight :
Original file line number Diff line number Diff line change 1313 }
1414 }
1515
16+ & .row-reverse {
17+ flex-direction : row-reverse ;
18+ .chart-legend-container {
19+ margin-left : 12px ;
20+ margin-right : 12px ;
21+ }
22+ }
23+
1624 & .column {
1725 flex-direction : column ;
1826 .chart-legend-container {
You can’t perform that action at this time.
0 commit comments