-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Description
Expected Behavior
Custom tooltip function executes when mouse leave chart element.
Current Behavior
Custom tooltip function do not executes if chart was updated inside config.hover.onHover callback.
Possible Solution
Problem appears here. chart.update() calls chart.tooltip.initialize(); which resets this._lastActive field and cause false negative result here; Simple solution is just replace this line with this._lastActive = this._lastActive || [];.
Steps to Reproduce (for bugs)
https://codepen.io/anon/pen/qzpPeb
- Hover any chart element
- Move cursor out of chart
Context
Environment
- Chart.js version: 2.8.0
- Browser name and version: Google Chrome Version 75.0.3770.100 (Official Build) (64-bit)