fix(ui): count vs percentage value shows correctly (#17568)

This commit is contained in:
Chirag Madlani 2024-08-23 18:40:06 +05:30 committed by GitHub
parent bb52bc779e
commit f000be355c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -510,7 +510,12 @@ export const DataInsightChartCard = ({
label={rightSidePanelLabel}
progress={round(totalValue, 2)}
showProgress={isPercentageGraph}
suffix={isPercentageGraph ? '%' : ''}
suffix={
isPercentageGraph ||
type === SystemChartType.TotalDataAssetsByTier
? '%'
: ''
}
target={targetValue}
/>
</Col>
@ -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={
![

View File

@ -445,7 +445,6 @@ export const isPercentageSystemGraph = (graph: SystemChartType) => {
SystemChartType.PercentageOfDataAssetWithOwner,
SystemChartType.PercentageOfServiceWithDescription,
SystemChartType.PercentageOfServiceWithOwner,
SystemChartType.TotalDataAssetsByTier,
].includes(graph);
};