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

Method _resolveAnimations

src/plugins/plugin.tooltip.js:545–561  ·  view source on GitHub ↗

* @private

()

Source from the content-addressed store, hash-verified

543 * @private
544 */
545 _resolveAnimations() {
546 const cached = this._cachedAnimations;
547
548 if (cached) {
549 return cached;
550 }
551
552 const chart = this.chart;
553 const options = this.options.setContext(this.getContext());
554 const opts = options.enabled && chart.options.animation && options.animations;
555 const animations = new Animations(this.chart, opts);
556 if (opts._cacheable) {
557 this._cachedAnimations = Object.freeze(animations);
558 }
559
560 return animations;
561 }
562
563 /**
564 * @protected

Callers 3

updateMethod · 0.95

Calls 2

getContextMethod · 0.95
setContextMethod · 0.80

Tested by

no test coverage detected