Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
AFTER FIX: