mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-26 09:55:52 +00:00
Fix: support string value for xAxis apart from date (#18590)
* Fix: show string value for xAxis apart from date * update key name
This commit is contained in:
parent
00fbf07387
commit
eadd93eb9b
@ -152,7 +152,11 @@ export const CustomTooltip = (props: DataInsightChartTooltipProps) => {
|
||||
} = props;
|
||||
|
||||
if (active && payload && payload.length) {
|
||||
const timestamp = dateTimeFormatter(payload[0].payload[timeStampKey] || 0);
|
||||
// we need to check if the xAxis is a date or not.
|
||||
const timestamp =
|
||||
timeStampKey === 'term'
|
||||
? payload[0].payload[timeStampKey]
|
||||
: dateTimeFormatter(payload[0].payload[timeStampKey] || 0);
|
||||
const payloadValue = uniqBy(payload, 'dataKey');
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user