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

Method getPixelForValue

docs/scripts/log2.js:48–55  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

46 }
47
48 getPixelForValue(value) {
49 if (value === undefined || value === 0) {
50 value = this.min;
51 }
52
53 return this.getPixelForDecimal(value === this.min ? 0
54 : (Math.log2(value) - this._startValue) / this._valueRange);
55 }
56
57 getValueForPixel(pixel) {
58 const decimal = this.getDecimalForPixel(pixel);

Callers

nothing calls this directly

Calls 1

getPixelForDecimalMethod · 0.65

Tested by

no test coverage detected