From 87f113db10f2b9ed79d7095fbbbbaed0ab177f09 Mon Sep 17 00:00:00 2001 From: jannisvisser Date: Mon, 16 Sep 2024 13:10:34 +0200 Subject: [PATCH] fix: improve readability of deviation from compact notation --- .../IBF-dashboard/src/app/pipes/compact.pipe.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts index c738dbf91..82cd12dc9 100644 --- a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts +++ b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts @@ -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; + } } }