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

Method getDecimalForValue

src/scales/scale.time.js:562–564  ·  view source on GitHub ↗

* @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC) * @return {number}

(value)

Source from the content-addressed store, hash-verified

560 * @return {number}
561 */
562 getDecimalForValue(value) {
563 return value === null ? NaN : (value - this.min) / (this.max - this.min);
564 }
565
566 /**
567 * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)

Callers 2

initOffsetsMethod · 0.95
getPixelForValueMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected