MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _dropHiddenActive

Method _dropHiddenActive

src/plugins/plugin.tooltip.js:1156–1166  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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

Callers 1

afterUpdateFunction · 0.80

Calls 2

updateMethod · 0.95
_filterActiveMethod · 0.80

Tested by

no test coverage detected