fix: display correct graph tooltip title (#3562)

This commit is contained in:
Yury Molodov 2022-12-29 21:06:48 +01:00 committed by GitHub
parent 2cedb3e883
commit 1720bddb4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ const ChartTooltip: FC<ChartTooltipProps> = ({
const name = useMemo(() => {
const metricName = (series[seriesIdx]?.label || "").replace(/{.+}/gmi, "").trim();
return getLegendLabel(metricName);
}, []);
}, [series, seriesIdx]);
const fields = useMemo(() => {
const metric = metrics[seriesIdx - 1]?.metric || {};