From ee3310a0f0369194f6bf30c42fc73069d9eb6ca7 Mon Sep 17 00:00:00 2001 From: sagely1 <114952739+sagely1@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:57:01 -0700 Subject: [PATCH] AG-1398 fix bug with pValues not showing when value is zero --- .../gene-comparison-tool-details-panel.component.html | 4 ++-- .../gene-comparison-tool-details-panel.component.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.html b/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.html index a4e0e1fac..ce33000e4 100644 --- a/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.html +++ b/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.html @@ -15,11 +15,11 @@
{{ data.valueLabel }}
-
P-Value
+
P-Value
{{ getSignificantFigures(data.value, 3) }}
-
+
{{ getSignificantFigures(data.pValue, 3) }}
diff --git a/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.ts b/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.ts index 9a16584ca..c3eb7e985 100644 --- a/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.ts +++ b/src/app/features/genes/components/gene-comparison-tool/components/gene-comparison-tool-details-panel/gene-comparison-tool-details-panel.component.ts @@ -96,6 +96,9 @@ export class GeneComparisonToolDetailsPanelComponent { } getSignificantFigures(n: any, b: any) { + const emdash = '—'; // Shift+Option+Hyphen + if (n === null || n === undefined) + return emdash; return this.helperService.getSignificantFigures(n, b); }