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

Method _convertTicksToLabels

src/core/core.scale.js:780–796  ·  view source on GitHub ↗

* @param {Tick[]} ticks * @private

(ticks)

Source from the content-addressed store, hash-verified

778 * @private
779 */
780 _convertTicksToLabels(ticks) {
781 this.beforeTickToLabelConversion();
782
783 this.generateTickLabels(ticks);
784
785 // Ticks should be skipped when callback returns null or undef, so lets remove those.
786 let i, ilen;
787 for (i = 0, ilen = ticks.length; i < ilen; i++) {
788 if (isNullOrUndef(ticks[i].label)) {
789 ticks.splice(i, 1);
790 ilen--;
791 i--;
792 }
793 }
794
795 this.afterTickToLabelConversion();
796 }
797
798 /**
799 * @return {{ first: object, last: object, widest: object, highest: object, widths: Array, heights: array }}

Callers 1

updateMethod · 0.95

Calls 4

generateTickLabelsMethod · 0.95
isNullOrUndefFunction · 0.85

Tested by

no test coverage detected