@@ -117,17 +117,28 @@ const getValueLabelTextAnchor = (rotate: boolean) => {
117
117
return rotate ? "start" : "middle" ;
118
118
} ;
119
119
120
- export const setSegmentValueLabelProps = <
120
+ export const setSegmentWrapperValueLabelProps = <
121
121
T extends { valueLabel ?: string ; valueLabelColor ?: string } ,
122
122
> (
123
123
g : Selection < BaseType , T , SVGGElement , null >
124
124
) => {
125
125
return g
126
126
. attr ( DISABLE_SCREENSHOT_COLOR_WIPE_KEY , true )
127
- . style ( "overflow" , "hidden" )
127
+ . style ( "display" , "flex" )
128
+ . style ( "justify-content" , "center" )
129
+ . style ( "align-items" , "center" )
128
130
. style ( "width" , "100%" )
129
- . style ( "margin" , 0 )
130
- . style ( "text-align" , "center" )
131
+ . style ( "height" , "100%" )
132
+ . style ( "padding" , "2px" ) ;
133
+ } ;
134
+
135
+ export const setSegmentValueLabelProps = <
136
+ T extends { valueLabel ?: string ; valueLabelColor ?: string } ,
137
+ > (
138
+ g : Selection < BaseType , T , SVGGElement , null >
139
+ ) => {
140
+ return g
141
+ . style ( "overflow" , "hidden" )
131
142
. style ( "font-size" , "12px" )
132
143
. style ( "white-space" , "nowrap" )
133
144
. style ( "text-overflow" , "ellipsis" ) ;
0 commit comments