Skip to content

Commit

Permalink
fix: improve readability of deviation from compact notation
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Sep 16, 2024
1 parent 95005cc commit 87f113d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export class CompactPipe implements PipeTransform {
let prefix = '';

if (format !== NumberFormat.perc) {
if (value > 10) {
min = 20;
} else if (value > 0) {
min = 10;
}

// Add deviation for values between 0 and 20
if (value > 0 && value < 20) {
prefix = '< ';

if (value > 10) {
min = 20;
} else if (value > 0) {
min = 10;
}
}
}

Expand Down

0 comments on commit 87f113d

Please sign in to comment.