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

Support CanvasGradient for hover colors #5865

Merged
merged 1 commit into from Nov 28, 2018
Merged

Conversation

nagix
Copy link
Contributor

@nagix nagix commented Nov 27, 2018

When hovering over the point that has CanvasGradient border/background colors, its colors turn into grey because helpers.color converts CanvasGradient to defaults.global.defaultColor and helpers.getHoverColor generates colors from it. This PR makes getHoverColor return the original value if it is CanvasGradient.

Chart.js 2.7.3 + #5858: https://jsfiddle.net/nagix/6rnfspu3/
gradient1

Chart.js 2.7.3 + #5858 + This PR: https://jsfiddle.net/nagix/2ao9yrbf/
gradient2

@simonbrunel simonbrunel added this to the Version 2.8 milestone Nov 27, 2018
simonbrunel
simonbrunel previously approved these changes Nov 27, 2018
Copy link
Member

@simonbrunel simonbrunel left a 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?

@nagix
Copy link
Contributor Author

nagix commented Nov 27, 2018

No issues have been reported. As I forgot to add a test for this, I will do shortly.

@benmccann
Copy link
Contributor

There was an issue filed recently about patterns not working with tooltips: #5860

@nagix
Copy link
Contributor Author

nagix commented Nov 27, 2018

@benmccann Yes, I'm aware of that and thinking of opening a new PR to fix issues of tooltips with both CanvasPattern and CanvasGradient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants