From f7848fbf1a29fe8da9aae1dae3623b561a50a2f5 Mon Sep 17 00:00:00 2001 From: ananzh Date: Thu, 21 Sep 2023 15:16:24 +0000 Subject: [PATCH] [Data Explorer][Discover] Fix total hits issue Issue Resolve https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5068 Signed-off-by: ananzh --- .../discover/public/application/components/chart/chart.tsx | 4 ++-- .../view_components/canvas/discover_chart_container.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/discover/public/application/components/chart/chart.tsx b/src/plugins/discover/public/application/components/chart/chart.tsx index 8ba188af3dd9..f21ce3e4ef19 100644 --- a/src/plugins/discover/public/application/components/chart/chart.tsx +++ b/src/plugins/discover/public/application/components/chart/chart.tsx @@ -21,8 +21,8 @@ import { useDiscoverContext } from '../../view_components/context'; import { setInterval, useDispatch, useSelector } from '../../utils/state_management'; interface DiscoverChartProps { - bucketInterval: TimechartHeaderBucketInterval; - chartData: Chart; + bucketInterval?: TimechartHeaderBucketInterval; + chartData?: Chart; config: IUiSettingsClient; data: DataPublicPluginStart; hits: number; diff --git a/src/plugins/discover/public/application/view_components/canvas/discover_chart_container.tsx b/src/plugins/discover/public/application/view_components/canvas/discover_chart_container.tsx index 568d61c2e4e0..ec57e086f8d4 100644 --- a/src/plugins/discover/public/application/view_components/canvas/discover_chart_container.tsx +++ b/src/plugins/discover/public/application/view_components/canvas/discover_chart_container.tsx @@ -20,7 +20,7 @@ export const DiscoverChartContainer = ({ hits, bucketInterval, chartData }: Sear indexPattern, ]); - if (!hits || !chartData || !bucketInterval) return null; + if (!hits) return null; return (