-
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
Add CanvasPattern support to tooltip #4284
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.
I think this should also check for gradients as well. Would be nice to have some tests covering this code and a fiddle that demonstrates what happens after the change. I think this might have some visual artifacts because the opacity is not merged
@@ -691,7 +691,14 @@ module.exports = function(Chart) { | |||
ctx.strokeRect(pt.x, pt.y, bodyFontSize, bodyFontSize); | |||
|
|||
// Inner square | |||
ctx.fillStyle = mergeOpacity(vm.labelColors[i].backgroundColor, opacity); | |||
var bgColor = vm.labelColors[i].backgroundColor; | |||
if (bgColor instanceof CanvasPattern) { |
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.
I think it would be a good idea to check for CanvasGradient
as well too
@swierczek @etimberg Any update on merging this? |
@ChrisKatsaras my comments above need to be addressed before merging and tests need to be written. I'm not sure if @swierczek planned to do them or not. |
I agree! @swierczek any idea when you will implement these changes? |
Checking it out now, sorry this was part of another project and once I figured it out I made the PR and promptly forgot about it ;) |
@swierczek do you still plan to make those updates? |
I took a stab at it a while back but again it fell off my radar... someone else is more than welcome to make these additional changes instead of waiting on me |
Closing due to inactivity |
Fix for #4279 and subsequently ashiguruma/patternomaly#10