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

Method getDecimalForPixel

src/core/core.scale.js:933–936  ·  view source on GitHub ↗

* @param {number} pixel * @return {number}

(pixel)

Source from the content-addressed store, hash-verified

931 * @return {number}
932 */
933 getDecimalForPixel(pixel) {
934 const decimal = (pixel - this._startPixel) / this._length;
935 return this._reversePixels ? 1 - decimal : decimal;
936 }
937
938 /**
939 * Returns the pixel for the minimum chart value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected