From c8ebb7695cb69da04380681216cf67757f364d0d Mon Sep 17 00:00:00 2001 From: AkashRajpurohit Date: Fri, 12 May 2023 22:38:12 +0530 Subject: [PATCH] fix: :adhesive_bandage: null value check for metric data --- components/metrics/MetricsTable.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/metrics/MetricsTable.js b/components/metrics/MetricsTable.js index 97deb39d..df2b8a69 100644 --- a/components/metrics/MetricsTable.js +++ b/components/metrics/MetricsTable.js @@ -59,7 +59,10 @@ export function MetricsTable({ const filteredData = useMemo(() => { if (data) { - let items = percentFilter(dataFilter ? dataFilter(data, filterOptions) : data); + const dataWithoutNullValues = data.filter(val => val.x !== null); + let items = percentFilter( + dataFilter ? dataFilter(dataWithoutNullValues, filterOptions) : dataWithoutNullValues, + ); if (limit) { items = items.filter((e, i) => i < limit); }