Skip to content

Support CanvasGradient for hover colors#5865

Merged
etimberg merged 1 commit into
chartjs:masterfrom
nagix:issue-5864
Nov 28, 2018
Merged

Support CanvasGradient for hover colors#5865
etimberg merged 1 commit into
chartjs:masterfrom
nagix:issue-5864

Conversation

@nagix

@nagix nagix commented Nov 27, 2018

Copy link
Copy Markdown
Contributor

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

@simonbrunel simonbrunel left a comment

Copy link
Copy Markdown
Member

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

nagix commented Nov 27, 2018

Copy link
Copy Markdown
Contributor Author

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

@benmccann

Copy link
Copy Markdown
Contributor

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

@nagix

nagix commented Nov 27, 2018

Copy link
Copy Markdown
Contributor Author

@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.

4 participants