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

Method getContext

src/core/core.scale.js:961–971  ·  view source on GitHub ↗

* @protected

(index)

Source from the content-addressed store, hash-verified

959 * @protected
960 */
961 getContext(index) {
962 const ticks = this.ticks || [];
963
964 if (index >= 0 && index < ticks.length) {
965 const tick = ticks[index];
966 return tick.$context ||
967 (tick.$context = createTickContext(this.getContext(), index, tick));
968 }
969 return this.$context ||
970 (this.$context = createScaleContext(this.chart.getContext(), this));
971 }
972
973 /**
974 * @return {number}

Callers 15

initMethod · 0.95
_callHooksMethod · 0.95
_computeGridLineItemsMethod · 0.95
_computeLabelItemsMethod · 0.95
getLineWidthForValueMethod · 0.95
drawBorderMethod · 0.95

Calls 2

createTickContextFunction · 0.85
createScaleContextFunction · 0.85

Tested by

no test coverage detected