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

Method getContext

src/core/core.scale.js:966–976  ·  view source on GitHub ↗

* @protected

(index)

Source from the content-addressed store, hash-verified

964 * @protected
965 */
966 getContext(index) {
967 const ticks = this.ticks || [];
968
969 if (index >= 0 && index < ticks.length) {
970 const tick = ticks[index];
971 return tick.$context ||
972 (tick.$context = createTickContext(this.getContext(), index, tick));
973 }
974 return this.$context ||
975 (this.$context = createScaleContext(this.chart.getContext(), this));
976 }
977
978 /**
979 * @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