Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click and hover events pass through x-axis #21136

Open
fidian opened this issue May 7, 2024 · 2 comments · May be fixed by #21157
Open

Click and hover events pass through x-axis #21136

fidian opened this issue May 7, 2024 · 2 comments · May be fixed by #21157

Comments

@fidian
Copy link

fidian commented May 7, 2024

Expected behaviour

I have a scollable bar chart and there are items hiding under the x-axis. When I hover over the x-axis or click on the x-axis, the click should be ignored because the bars in that area are not visible.

Actual behaviour

Clicks trigger selections of rows (not shown in the demo). Hover events still trigger popups in the x-axis (shown in demo). Right-clicking in the spot shows the bar in the SVG as the topmost element.

image

Live demo with steps to reproduce

https://jsfiddle.net/jo3vm6s1/

This does not implement selection of items, but does show how the cursor events are triggering things for bars that are not visible.

Product version

  • Highcharts JS v11.4.1 (2024-04-04)

Affected browser(s)

Chrome.

@karolkolodziej
Copy link
Contributor

Hi @fidian! Thank you for reaching out!

You are right with opacity: 1, it doesn't make much sense- see the simplified demo.
image

But with a default one, it looks better but still, I'm not sure if this is correct.
image

It has been working like this since the get-go, any comments @TorsteinHonsi?

@TorsteinHonsi
Copy link
Collaborator

@karolkolodziej I think it's a bug. It should be trivial (famous last words) to check the click coordinates or the target point for chart.isInsidePlot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants