* Drops the active elements whose data is hidden or no longer exists, after the chart * updated its datasets, as the chart does with its own. The tooltip hides when none is left. * @private
()
| 1154 | * @private |
| 1155 | */ |
| 1156 | _dropHiddenActive() { |
| 1157 | const lastActive = this._active; |
| 1158 | const active = this.chart._filterActive(lastActive); |
| 1159 | if (active.length !== lastActive.length) { |
| 1160 | this._active = active; |
| 1161 | // As in handleEvent: a tooltip that is neither drawn nor external is not laid out. |
| 1162 | if (this.options.enabled || this.options.external) { |
| 1163 | this.update(true); |
| 1164 | } |
| 1165 | } |
| 1166 | } |
| 1167 | |
| 1168 | /** |
| 1169 | * Get active elements in the tooltip |
no test coverage detected