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

Method getPixelForValue

src/scales/scale.category.js:133–139  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

131
132 // Used to get data value locations. Value can either be an index or a numerical value
133 getPixelForValue(value) {
134 if (typeof value !== 'number') {
135 value = this.parse(value);
136 }
137
138 return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);
139 }
140
141 // Must override base implementation because it calls getPixelForValue
142 // and category scale can have duplicate values

Callers 1

getPixelForTickMethod · 0.95

Calls 2

parseMethod · 0.95
getPixelForDecimalMethod · 0.65

Tested by

no test coverage detected