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

Method getContext

src/core/core.scale.js:969–979  ·  view source on GitHub ↗

* @protected

(index)

Source from the content-addressed store, hash-verified

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