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

fixed pie tooltip positioning bug #119

Merged
merged 1 commit into from
Jun 11, 2015
Merged

Conversation

kenirwin
Copy link
Contributor

@kenirwin kenirwin commented Jun 8, 2015

This pull request fixes the bug whereby the tooltip for pie charts appears at the very bottom of a page instead of hovering over the chart as the tooltip for other kinds of charts. (This bug was documented in my comments on issue #105. I'm not sure if this fixes the original bug reported in that same issue, as I have not been able to replicate that user's problem.)

Using a bunch of console.log() calls, I was able to determine that the pie chart does set the position of the tooltip, and then somehow it unsets it right after, so it only ever appears in the wrong place. The fix I've implemented here add an instruction: if the tooltip position is currently undefined, keep the last known defined position. Since it resets every pixel or so that the mouse moves, this shouldn't cause trouble. It may mean that when the tooltip is hidden, it may technically be floating invisibly over the chart, but that should also not be a problem. I've tested the fix on all of the tooltip example files; it does fix the pie chart and it does not break any of the others.

BEFORE FIX:

tooltip-piebottom2

AFTER FIX:

tooltip-piehover

Roundaround added a commit that referenced this pull request Jun 11, 2015
fixed pie tooltip positioning bug
@Roundaround Roundaround merged commit 16aeeb1 into krzysu:master Jun 11, 2015
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.

2 participants