Skip to content

Conversation

@nagix
Copy link
Contributor

@nagix nagix commented Nov 29, 2018

This PR replaces mergeOpacity calls with ctx.globalAlpha to support CanvasPattern and CanvasGradient as tooltip item colors.

master: https://jsfiddle.net/nagix/hLn3uy5q/
tooltip1

master + This PR: https://jsfiddle.net/nagix/xc3vo2kh/
tooltip2

Fixes #4279

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.

I like the use of the global opacity and the code simplification. In your fiddle, the tooltip with a pattern (second dataset) is a bit strange because the pattern seems to move in the tooltip box. But I guess that's a good choice since it works better with gradient (third dataset).

padding: 15
}
},
plugins: [{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, I never thought about using plugins to test interactions!

@simonbrunel simonbrunel requested a review from etimberg November 29, 2018 11:23
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.

3 participants