MCPcopy
hub / github.com/chartjs/Chart.js / getDataTimestamps

Method getDataTimestamps

src/scales/scale.time.js:627–646  ·  view source on GitHub ↗

* @protected

()

Source from the content-addressed store, hash-verified

625 * @protected
626 */
627 getDataTimestamps() {
628 let timestamps = this._cache.data || [];
629 let i, ilen;
630
631 if (timestamps.length) {
632 return timestamps;
633 }
634
635 const metas = this.getMatchingVisibleMetas();
636
637 if (this._normalized && metas.length) {
638 return (this._cache.data = metas[0].controller.getAllParsedValues(this));
639 }
640
641 for (i = 0, ilen = metas.length; i < ilen; ++i) {
642 timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));
643 }
644
645 return (this._cache.data = this.normalize(timestamps));
646 }
647
648 /**
649 * @protected

Callers 1

_generateMethod · 0.95

Calls 3

normalizeMethod · 0.95
getAllParsedValuesMethod · 0.80

Tested by

no test coverage detected