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

Function flipScale

src/components/colorscale/helpers.js:137–146  ·  view source on GitHub ↗
(scl)

Source from the content-addressed store, hash-verified

135}
136
137function flipScale(scl) {
138 var N = scl.length;
139 var sclNew = new Array(N);
140
141 for(var i = N - 1, j = 0; i >= 0; i--, j++) {
142 var si = scl[i];
143 sclNew[j] = [1 - si[0], si[1]];
144 }
145 return sclNew;
146}
147
148/**
149 * General colorscale function generator.

Callers 3

colorscale_test.jsFile · 0.85
calcOptsFunction · 0.85
extractScaleFunction · 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…