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

Method getDecimalForPixel

src/core/core.scale.js:938–941  ·  view source on GitHub ↗

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

(pixel)

Source from the content-addressed store, hash-verified

936 * @return {number}
937 */
938 getDecimalForPixel(pixel) {
939 const decimal = (pixel - this._startPixel) / this._length;
940 return this._reversePixels ? 1 - decimal : decimal;
941 }
942
943 /**
944 * Returns the pixel for the minimum chart value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected