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

Method getPixelForValue

src/scales/scale.logarithmic.js:210–220  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

208 }
209
210 getPixelForValue(value) {
211 if (value === undefined || value === 0) {
212 value = this.min;
213 }
214 if (value === null || isNaN(value)) {
215 return NaN;
216 }
217 return this.getPixelForDecimal(value === this.min
218 ? 0
219 : (log10(value) - this._startValue) / this._valueRange);
220 }
221
222 getValueForPixel(pixel) {
223 const decimal = this.getDecimalForPixel(pixel);

Callers

nothing calls this directly

Calls 1

getPixelForDecimalMethod · 0.65

Tested by

no test coverage detected