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

Refactor tooltip draw function to extract drawBackground method #3417

Merged
merged 1 commit into from
Oct 4, 2016

Conversation

mjeanroy
Copy link
Contributor

@mjeanroy mjeanroy commented Oct 4, 2016

See #3416

Copy link
Member

@etimberg etimberg left a comment

Choose a reason for hiding this comment

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

+1 to merge.

@etimberg etimberg merged commit b64cab0 into chartjs:master Oct 4, 2016
@simonbrunel simonbrunel modified the milestone: Version 2.4 Nov 4, 2016
@kasimkha
Copy link

I have done the changes in my core.tooltip.js file then generated bundle for the minified js files and using this in my angular module. For setting background of tooltip dynamically i have added
Chart.Tooltip.prototype.drawBackground = function(pt, vm, ctx, tooltipSize, opacity) {
// New implementation
debugger;
if (vm.dataPoints[0].xLabel == 2) {
vm.backgroundColor = 'rgb(45,156,219)';

}
return vm.backgroundColor;
}; but the same isn't seem to be working.Am i doing something wrong ?

@kasimkha
Copy link

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

Successfully merging this pull request may close these issues.

None yet

4 participants