From c180a7e0ca773e3a9a302d2736f7789a864cc8e5 Mon Sep 17 00:00:00 2001 From: Aram Al-Sabti Date: Mon, 23 May 2022 12:00:48 +0200 Subject: [PATCH] Only show "no data" when data isn't defined --- src/app/graph/graph.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/graph/graph.component.ts b/src/app/graph/graph.component.ts index e1d0d478..89dac1a8 100644 --- a/src/app/graph/graph.component.ts +++ b/src/app/graph/graph.component.ts @@ -69,7 +69,9 @@ export class GraphComponent implements OnChanges { return ( !this.data?.datasets?.length || (this.data.datasets.length === 1 && - !this.data.datasets[0].data.some((point) => !!point)) + !this.data.datasets[0].data.some( + (point) => point !== null && point !== undefined + )) ); }