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

Enhancement: support Tooltip opening on hover of specific chart element (Bar, Line Coordinate, etc.) #3388

Open
ThuanNIT opened this issue Feb 21, 2023 · 8 comments
Labels
enhancement Enhancement to a current API

Comments

@ThuanNIT
Copy link

No description provided.

@ThuanNIT ThuanNIT changed the title How to onMousemove cursor on Bar to display tooltip ? How to only onMousemove cursor on Bar to display tooltip ? Feb 21, 2023
@ThuanNIT
Copy link
Author

@ckifer
Copy link
Member

ckifer commented Feb 21, 2023

Hi @ThuanNIT - this is a valid feature request but can you edit the title to reflect that? Something like "Enhancement: support Tooltip opening on hover of specific chart element" Thanks

@ckifer ckifer added the enhancement Enhancement to a current API label Feb 21, 2023
@nikolasrieble
Copy link
Contributor

The Tooltip behaviour needs improvement, agree. If you could spend more time documenting the expected behaviour in this issue, that would highly increase the chance of us looking into it.

How would that behave for Dots? How would it work for lines? How about the Area?

@ckifer ckifer changed the title How to only onMousemove cursor on Bar to display tooltip ? Enhancement: support Tooltip opening on hover of specific chart element (Bar, Line Coordinate, etc.) Feb 23, 2023
@ckifer
Copy link
Member

ckifer commented Feb 23, 2023

IMO we need two different modes. One that maintains the current behavior - one that is scoped to the chart elements. Bar is easy (only show within rect bounds). Line would be only show on hover dot. Area would be within the area only to closest dot. Composed would be interesting

@linaffilomania
Copy link

IMO we need two different modes. One
can use this in pieChart ?

@ckifer
Copy link
Member

ckifer commented Feb 27, 2023

Polar charts would be a little different but yeah the idea would be the same. (Although I think they behave closer to this way now than Cartesian graph items)

@linaffilomania
Copy link

Polar charts would be a little different but yeah the idea would be the same. (Although I think they behave closer to this way now than Cartesian graph items)

https://codesandbox.io/embed/epic-herschel-w6j7se?file=/src/App.js&codemirror=1
I'm trying to use it here and can't, I'd appreciate some help

@ckifer
Copy link
Member

ckifer commented Feb 27, 2023

I added a tooltip to your example, but I'm confused at what you're tying to do.

https://codesandbox.io/s/intelligent-northcutt-x3ch1r?file=/src/App.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to a current API
Projects
None yet
Development

No branches or pull requests

4 participants