File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,21 +72,16 @@ export function RangeWithValue({
7272 } ) ;
7373
7474 const meanValue = ( expectedMin + expectedMax ) / 2 ;
75- const meanLabelWidth = 28 ;
75+ const meanLabelWidth = 18 ;
7676
7777 return (
7878 < Container >
7979 < Scale >
8080 < RangeLine left = { `${ percentage ( expectedMin ) } %` } />
8181 < RangeLine left = { `${ percentage ( expectedMax ) } %` } />
8282 { showMean && (
83- < Label
84- left = { `calc(${ percentage ( meanValue ) } % - ${ meanLabelWidth / 2 } px)` }
85- >
86- { meanValue . toFixed ( 2 ) }
87- </ Label >
83+ < RangeLine left = { `calc(${ percentage ( meanValue ) } % - 0.5px)` } />
8884 ) }
89-
9085 < Tooltip
9186 title = { ( ( ) => {
9287 if ( isOutOfRange ) {
@@ -129,6 +124,13 @@ export function RangeWithValue({
129124 < Label left = { `calc(${ percentage ( expectedMax ) } % - 14px)` } >
130125 { expectedMax }
131126 </ Label >
127+ { showMean && (
128+ < Label
129+ left = { `calc(${ percentage ( meanValue ) } % - ${ meanLabelWidth / 2 } px)` }
130+ >
131+ { meanValue . toFixed ( 2 ) }
132+ </ Label >
133+ ) }
132134 </ LabelWrapper >
133135 </ Container >
134136 ) ;
You can’t perform that action at this time.
0 commit comments