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

Fix tooltip text alignment #4684

Closed

Conversation

silverspectro
Copy link

No description provided.

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.

@silverspectro can you rebase this PR on master and remove changes related to your other PR #4638?

@silverspectro
Copy link
Author

is this okay ?

pt.y += vm.yPadding;

// Titles
this.drawTitle(pt, vm, ctx, opacity);
this.drawTitle(pt, vm, ctx, opacity, tooltipSize);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure this is the best solution. tooltipSize is just vm.width and vm.height (line 792). I would prefer just using vm.width and vm.height inside these functions since it avoids another parameter

@@ -806,17 +809,17 @@ module.exports = function(Chart) {
this.drawBackground(pt, vm, ctx, tooltipSize, opacity);

// Draw Title, Body, and Footer
pt.x += vm.xPadding;
// pt.x += vm.xPadding;
Copy link
Member

Choose a reason for hiding this comment

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

[nit] please remove commented code

- Delete TooltipSize to use vm.height and vm.width
- Delete commented code
- Fix Typo
@benmccann
Copy link
Contributor

@silverspectro your changes are making the tests fail

ReferenceError: getBoxHeight is not defined

@benmccann
Copy link
Contributor

You may be interested in #4890 which is also defining getBoxHeight

@etimberg
Copy link
Member

Closing due to inactivity

@etimberg etimberg closed this Dec 31, 2017
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.

4 participants