File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -397,12 +397,17 @@ export function getPercentageChange(
397
397
const percentChange = ( ( current - baseline ) / baseline ) * 100
398
398
const absolutePercentChange = Math . abs ( percentChange ) . toFixed ( 2 )
399
399
400
+ let icon , direction
400
401
// For metrics where lower is better (like response time), a decrease is positive
401
402
// For metrics where higher is better (like throughput), an increase is positive
402
403
const isPositive = higherIsBetter ? percentChange > 0 : percentChange < 0
403
-
404
- const icon = isPositive ? '✅' : '❌'
405
- const direction = percentChange > 0 ? '↑' : '↓'
404
+ if ( current === baseline ) {
405
+ icon = '🔘'
406
+ direction = ''
407
+ } else {
408
+ icon = isPositive ? '✅' : '❌'
409
+ direction = percentChange > 0 ? '↑' : '↓'
410
+ }
406
411
407
412
return ` (${ icon } ${ direction } ${ absolutePercentChange } %)`
408
413
}
You can’t perform that action at this time.
0 commit comments