Support CanvasGradient for hover colors#5865
Merged
etimberg merged 1 commit intochartjs:masterfrom Nov 28, 2018
Merged
Conversation
simonbrunel
previously approved these changes
Nov 27, 2018
Member
simonbrunel
left a comment
There was a problem hiding this comment.
@nagix Thanks. Any ticket(s) to close with that PR?
Contributor
Author
|
No issues have been reported. As I forgot to add a test for this, I will do shortly. |
Contributor
|
There was an issue filed recently about patterns not working with tooltips: #5860 |
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. |
simonbrunel
approved these changes
Nov 27, 2018
etimberg
approved these changes
Nov 28, 2018
This was referenced Mar 4, 2020
This was referenced Mar 9, 2020
This was referenced Apr 14, 2020
exwm
pushed a commit
to exwm/Chart.js
that referenced
this pull request
Apr 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When hovering over the point that has CanvasGradient border/background colors, its colors turn into grey because
helpers.colorconvertsCanvasGradienttodefaults.global.defaultColorandhelpers.getHoverColorgenerates colors from it. This PR makesgetHoverColorreturn 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/
