diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/TotalEntityInsightSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/TotalEntityInsightSummary.component.tsx index 446270600c57..0ae910cd95d5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/TotalEntityInsightSummary.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsight/TotalEntityInsightSummary.component.tsx @@ -13,7 +13,7 @@ import { Button, Col, Row } from 'antd'; import { Gutter } from 'antd/lib/grid/row'; import classNames from 'classnames'; -import { includes, toLower } from 'lodash'; +import { includes, startCase, toLower } from 'lodash'; import React, { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { updateActiveChartFilter } from '../../utils/ChartUtils'; @@ -114,7 +114,7 @@ const TotalEntityInsightSummary = ({ onMouseEnter={() => handleLegendMouseEnter(entity)} onMouseLeave={handleLegendMouseLeave}> { dateTimeFormatter?: (date?: number) => string; valueFormatter?: (value: number | string, key?: string) => string | number; timeStampKey?: string; + transformLabel?: boolean; } export interface UIKpiResult extends KpiResult { 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 297c08e425bf..7d0dca2fc50d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx @@ -149,6 +149,7 @@ export const CustomTooltip = (props: DataInsightChartTooltipProps) => { dateTimeFormatter = formatDate, isPercentage, timeStampKey = 'timestampValue', + transformLabel = true, } = props; if (active && payload && payload.length) { @@ -172,7 +173,9 @@ export const CustomTooltip = (props: DataInsightChartTooltipProps) => { - {startCase(entry.name ?? (entry.dataKey as string))} + {transformLabel + ? startCase(entry.name ?? (entry.dataKey as string)) + : entry.name ?? (entry.dataKey as string)} {valueFormatter