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

Method getPixelForValue

src/scales/scale.linear.js:44–46  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

42
43 // Utils
44 getPixelForValue(value) {
45 return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);
46 }
47
48 getValueForPixel(pixel) {
49 return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;

Callers

nothing calls this directly

Calls 1

getPixelForDecimalMethod · 0.65

Tested by

no test coverage detected