From bf5f38ba1eefdc2941636885b7118573e2bd2247 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Mon, 11 Mar 2024 10:31:24 +0200 Subject: [PATCH] fix: chart xAxis and null values (#6472) Changes the xAxis from 'week' to 'date' (timeline fix) Replace null values with 0 --------- Signed-off-by: andreas-unleash --- .../MetricsChartTooltip.tsx | 20 +++++++++++++------ .../MetricsSummaryChart.tsx | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsChartTooltip/MetricsChartTooltip.tsx b/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsChartTooltip/MetricsChartTooltip.tsx index eeaf108500..974f3b2dc6 100644 --- a/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsChartTooltip/MetricsChartTooltip.tsx +++ b/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsChartTooltip/MetricsChartTooltip.tsx @@ -109,17 +109,19 @@ export const MetricsSummaryTooltip: VFC<{ tooltip: TooltipState | null }> = ({ /> = ({ /> diff --git a/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsSummaryChart.tsx b/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsSummaryChart.tsx index d98c76ed17..5eec326864 100644 --- a/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsSummaryChart.tsx +++ b/frontend/src/component/executiveDashboard/componentsChart/MetricsSummaryChart/MetricsSummaryChart.tsx @@ -26,7 +26,7 @@ export const MetricsSummaryChart: VFC = ({ isLocalTooltip TooltipComponent={MetricsSummaryTooltip} overrideOptions={{ - parsing: { yAxisKey: 'totalRequests', xAxisKey: 'week' }, + parsing: { yAxisKey: 'totalRequests', xAxisKey: 'date' }, }} cover={notEnoughData ? : false} />