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

add onMouseOver / onMouseOut events #19

Open
lucafalasco opened this issue Aug 29, 2019 · 3 comments
Open

add onMouseOver / onMouseOut events #19

lucafalasco opened this issue Aug 29, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@lucafalasco
Copy link
Owner

lucafalasco commented Aug 29, 2019

It would be useful to add mouse events handlers to each element of the data visualizations, in order to make it possible to pass a callback to handle those events to eventually trigger side effects.
This could be done similarly to how it currently works with the tooltip prop.
I think something like this could work:

interface Props {
  ...
  onMouseOver?: (e: React.MouseEvent, d: Datum) => void
  onMouseOut?: (e: React.MouseEvent, d: Datum) => void
}
@lucafalasco lucafalasco added the enhancement New feature or request label Aug 29, 2019
@aashish-chaubey
Copy link

Can you please provide a little more details on it?

@lucafalasco
Copy link
Owner Author

Thank you @aashish-chaubey, I've updated the description 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@lucafalasco @aashish-chaubey and others