mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
fix: Incorrect hovered items in tooltips (#30405)
This commit is contained in:
committed by
GitHub
parent
0fdcd8b27e
commit
36f7a3f524
@@ -593,6 +593,7 @@ export default function transformProps(
|
||||
extractForecastValuesFromTooltipParams(forecastValue);
|
||||
|
||||
const keys = Object.keys(forecastValues);
|
||||
let focusedRow;
|
||||
keys.forEach(key => {
|
||||
const value = forecastValues[key];
|
||||
// if there are no dimensions, key is a verbose name of a metric,
|
||||
@@ -627,12 +628,11 @@ export default function transformProps(
|
||||
: tooltipFormatterSecondary,
|
||||
});
|
||||
rows.push(row);
|
||||
if (key === focusedSeries) {
|
||||
focusedRow = rows.length - 1;
|
||||
}
|
||||
});
|
||||
return tooltipHtml(
|
||||
rows,
|
||||
tooltipFormatter(xValue),
|
||||
keys.findIndex(key => key === focusedSeries),
|
||||
);
|
||||
return tooltipHtml(rows, tooltipFormatter(xValue), focusedRow);
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
|
||||
Reference in New Issue
Block a user