Skip to content

Commit 487c40f

Browse files
authored
fix(aci): Disable highlighting series on hover (#103950)
fixes this flashing that happens https://github.com/user-attachments/assets/ed881394-25f7-42af-ac24-fa6afd2bd017
1 parent 2bb3b87 commit 487c40f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

static/app/views/detectors/hooks/useMetricDetectorSeries.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ interface UseMetricDetectorSeriesResult {
3636
series: Series[];
3737
}
3838

39+
function applySharedSeriesOptions(series: Series[]): Series[] {
40+
return series.map(s => ({
41+
...s,
42+
// Disable mouse hover emphasis effect on series points
43+
emphasis: {disabled: true},
44+
}));
45+
}
46+
3947
/**
4048
* Make the request to the backend provided series query and transform into a series
4149
*/
@@ -106,8 +114,8 @@ export function useMetricDetectorSeries({
106114
: [];
107115

108116
return {
109-
series: transformedSeries,
110-
comparisonSeries: transformedComparisonSeries,
117+
series: applySharedSeriesOptions(transformedSeries),
118+
comparisonSeries: applySharedSeriesOptions(transformedComparisonSeries),
111119
};
112120
}, [datasetConfig, data, aggregate, comparisonDelta]);
113121

0 commit comments

Comments
 (0)