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

Line annotation tooltip not visible even when hideLinesTooltips is set to false #2549

Open
karosowka13 opened this issue Oct 15, 2024 · 3 comments
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request :tooltip Related to hover tooltip

Comments

@karosowka13
Copy link

Describe the issue

When hovering line annotation the line annotation's tooltip doesn't show up. Only while hovering the marker the tooltip appears.
Even with the hideLinesTooltips set to false and high zIndex.
I also tried to disable tooltips with <Tooltip customTooltip={() => null} /> to ensure that tooltip with the value doesn't hide the annotation tooltip, but it didn't solve the issue.

To Reproduce
See this codesandbox.
Steps to reproduce the behavior:

  1. Hover over line annotation
  2. Hover over marker

Expected behaviour
I would expect to see the line annotation tooltip when we hover over line.

Screenshots

LineAnnotationTooltip.mov

Version (please complete the following information):

  • Elastic Charts: 66.1.1
@karosowka13 karosowka13 added the bug Something isn't working label Oct 15, 2024
@markov00 markov00 added enhancement New feature or request and removed bug Something isn't working labels Oct 17, 2024
@markov00
Copy link
Member

Thanks for submitting the issue, this is actually by design. I've changed the label to enhancement so we can track this request.

@markov00 markov00 added :annotation Annotation (line, rect, text) related issue :tooltip Related to hover tooltip labels Oct 17, 2024
@karosowka13
Copy link
Author

Thanks a lot.
What's hideLinesTooltips prop for then?

@nickofthyme
Copy link
Collaborator

@karosowka13 the hideLinesTooltips was added some time ago in #339 and the usage of it was removed in #418 but we clearly missed removing that from the types. I opened #2555 to remove hideLinesTooltips.

The original issue that hideLinesTooltips was attempting to solve, was how to nicely display both the main tooltip and the annotation tooltip at the same time, see #297. For the time being we simply settled on displaying the line annotation tooltip when hovering the icon and the rect annotation only when the main tooltip was not displayed. In such case where we want to display the rect annotation message in addition to the main tooltip, we manually inject the contents into the header.

Image

Our next step is to handle this collision better. We have ideas of how to do this such as that mentioned in #615 (comment) and shown below.

Image

But this tooltip work is not our top priority at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request :tooltip Related to hover tooltip
Projects
None yet
Development

No branches or pull requests

3 participants