Skip to content

Commit 72092ae

Browse files
committed
Fix legend click triggering both SeriesClick and LegendClick
Exclude .rz-legend-item elements from the chart container's JS click handler so clicking a legend item only fires LegendClick.
1 parent 2251ef5 commit 72092ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Radzen.Blazor/wwwroot/Radzen.Blazor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ window.Radzen = {
20342034
var rect = ref.getBoundingClientRect();
20352035
var x = e.clientX - rect.left;
20362036
var y = e.clientY - rect.top;
2037-
if (!e.target.closest('.rz-marker')) {
2037+
if (!e.target.closest('.rz-marker') && !e.target.closest('.rz-legend-item')) {
20382038
try { instance.invokeMethodAsync('Click', x, y); } catch { }
20392039
}
20402040
};

0 commit comments

Comments
 (0)