-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
How to apply "cursor: pointer" css #3539
Comments
@blubberbo this could be done. I'm not sure if having it live in the core is the best or if it should be a plugin |
Once I think #2292 is done, plugins will get notified about mouse events. You could use this to know when to look over the position and see if anything is under the mouse. Then, if anything is under the mouse position, you could rewrite the cursor style |
See https://jsfiddle.net/rsz3g4ok/1/ using the work done in #3718 which changes the cursor style when over the clickable areas of the legend. |
thank you! |
Note: since v2.5.0 the onHover event now returns two arguments. This means that @etimberg's solution needs a slight modification. If you change lines 14 & 15 from this...
to this...
it will work with newer ChartJS versions |
Is there an easy way too apply the CSS - "cursor:pointer" so that whenever the mouse is over a graph or a legend or anything clickable it is a pointer instead of the default?
It seems more logical that way to me, since the legend may not be clearly clickable to everyone.
Thanks
The text was updated successfully, but these errors were encountered: