@@ -18,7 +18,7 @@ export function ConfidenceFooter(props: Props) {
18
18
}
19
19
20
20
function confidenceMessage ( { sampleCount, confidence, topEvents, isSampled} : Props ) {
21
- const isTopN = defined ( topEvents ) && topEvents > 0 ;
21
+ const isTopN = defined ( topEvents ) && topEvents > 1 ;
22
22
if ( ! defined ( sampleCount ) ) {
23
23
return isTopN
24
24
? t ( '* Chart for top %s groups extrapolated from \u2026' , topEvents )
@@ -27,36 +27,36 @@ function confidenceMessage({sampleCount, confidence, topEvents, isSampled}: Prop
27
27
28
28
const noSampling = defined ( isSampled ) && ! isSampled ;
29
29
30
- const lowAccuracySampleCount = (
31
- < Tooltip
32
- title = {
33
- < div >
34
- { t ( 'You may not have enough samples for high accuracy.' ) }
35
- < br />
36
- < br />
37
- { t (
38
- 'You can try adjusting your query by removing filters or increasing the time interval.'
39
- ) }
40
- < br />
41
- < br />
42
- { t (
43
- 'You can also increase your sampling rates to get more samples and accurate trends.'
44
- ) }
45
- </ div >
46
- }
47
- disabled = { noSampling }
48
- maxWidth = { 270 }
49
- >
50
- < InsufficientSamples >
51
- < Count value = { sampleCount } />
52
- </ InsufficientSamples >
53
- </ Tooltip >
54
- ) ;
55
-
56
30
if ( confidence === 'low' ) {
31
+ const lowAccuracySampleCount = (
32
+ < Tooltip
33
+ title = {
34
+ < div >
35
+ { t ( 'You may not have enough samples for high accuracy.' ) }
36
+ < br />
37
+ < br />
38
+ { t (
39
+ 'You can try adjusting your query by removing filters or increasing the time interval.'
40
+ ) }
41
+ < br />
42
+ < br />
43
+ { t (
44
+ 'You can also increase your sampling rates to get more samples and accurate trends.'
45
+ ) }
46
+ </ div >
47
+ }
48
+ disabled = { noSampling }
49
+ maxWidth = { 270 }
50
+ >
51
+ < InsufficientSamples >
52
+ < Count value = { sampleCount } />
53
+ </ InsufficientSamples >
54
+ </ Tooltip >
55
+ ) ;
56
+
57
57
if ( isTopN ) {
58
- return tct ( 'Sample count for top [groupText] : [sampleCount]' , {
59
- groupText : topEvents > 1 ? tct ( '[topEvents] groups' , { topEvents } ) : t ( 'group' ) ,
58
+ return tct ( 'Sample count for top [topEvents] groups : [sampleCount]' , {
59
+ topEvents,
60
60
sampleCount : lowAccuracySampleCount ,
61
61
} ) ;
62
62
}
0 commit comments