fix: display correct graph tooltip title (#3562)

This commit is contained in:
Yury Molodov 2022-12-29 21:06:48 +01:00 committed by Aliaksandr Valialkin
parent c22122212d
commit 2370f03c52
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

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 || {};