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

Method getValueForPixel

src/scales/scale.timeseries.js:170–174  ·  view source on GitHub ↗

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

(pixel)

Source from the content-addressed store, hash-verified

168 * @return {number}
169 */
170 getValueForPixel(pixel) {
171 const offsets = this._offsets;
172 const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
173 return interpolate(this._table, decimal * this._tableRange + this._minPos, true);
174 }
175}
176
177export default TimeSeriesScale;

Callers

nothing calls this directly

Calls 2

interpolateFunction · 0.85
getDecimalForPixelMethod · 0.65

Tested by

no test coverage detected