From f000be355c8f6686adeef3bc1e77a37fdb4c0f22 Mon Sep 17 00:00:00 2001 From: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:40:06 +0530 Subject: [PATCH] fix(ui): count vs percentage value shows correctly (#17568) --- .../components/DataInsight/DataInsightChartCard.tsx | 12 +++++++----- .../main/resources/ui/src/utils/DataInsightUtils.tsx | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/DataInsightChartCard.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/DataInsightChartCard.tsx index 7e0c0440075..edfe58b1dc0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/DataInsightChartCard.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/DataInsightChartCard.tsx @@ -510,7 +510,12 @@ export const DataInsightChartCard = ({ label={rightSidePanelLabel} progress={round(totalValue, 2)} showProgress={isPercentageGraph} - suffix={isPercentageGraph ? '%' : ''} + suffix={ + isPercentageGraph || + type === SystemChartType.TotalDataAssetsByTier + ? '%' + : '' + } target={targetValue} /> @@ -538,10 +543,7 @@ export const DataInsightChartCard = ({ activeKeys.length ? activeKeys.includes(entity) : true } label={`${round(latestData[entity] ?? 0, 2)}${ - isPercentageGraph && - type !== SystemChartType.TotalDataAssetsByTier - ? '%' - : '' + isPercentageGraph ? '%' : '' }`} pluralize={ ![ diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx index 0be2904a222..3092a5beb31 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx @@ -445,7 +445,6 @@ export const isPercentageSystemGraph = (graph: SystemChartType) => { SystemChartType.PercentageOfDataAssetWithOwner, SystemChartType.PercentageOfServiceWithDescription, SystemChartType.PercentageOfServiceWithOwner, - SystemChartType.TotalDataAssetsByTier, ].includes(graph); };