-
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
Support CanvasGradient for hover colors #5865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nagix Thanks. Any ticket(s) to close with that PR?
No issues have been reported. As I forgot to add a test for this, I will do shortly. |
There was an issue filed recently about patterns not working with tooltips: #5860 |
@benmccann Yes, I'm aware of that and thinking of opening a new PR to fix issues of tooltips with both CanvasPattern and CanvasGradient. |
When hovering over the point that has CanvasGradient border/background colors, its colors turn into grey because
helpers.color
convertsCanvasGradient
todefaults.global.defaultColor
andhelpers.getHoverColor
generates colors from it. This PR makesgetHoverColor
return the original value if it is CanvasGradient.Chart.js 2.7.3 + #5858: https://jsfiddle.net/nagix/6rnfspu3/
Chart.js 2.7.3 + #5858 + This PR: https://jsfiddle.net/nagix/2ao9yrbf/