MCPcopy Index your code
hub / github.com/plotly/plotly.js / setColor

Function setColor

src/traces/heatmap/plot.js:204–218  ·  view source on GitHub ↗
(v, pixsize)

Source from the content-addressed store, hash-verified

202 var xb, xi, v, row, c;
203
204 function setColor(v, pixsize) {
205 if (v !== undefined) {
206 var c = sclFunc(v);
207 c[0] = Math.round(c[0]);
208 c[1] = Math.round(c[1]);
209 c[2] = Math.round(c[2]);
210
211 pixcount += pixsize;
212 rcount += c[0] * pixsize;
213 gcount += c[1] * pixsize;
214 bcount += c[2] * pixsize;
215 return c;
216 }
217 return [0, 0, 0, 0];
218 }
219
220 function interpColor(r0, r1, xinterp, yinterp) {
221 var z00 = r0[xinterp.bin0];

Callers 2

interpColorFunction · 0.85
plot.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…