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

Function relinkColorAttrs

src/components/colorscale/cross_trace_defaults.js:15–39  ·  view source on GitHub ↗
(outerCont, cbOpt)

Source from the content-addressed store, hash-verified

13 }
14
15 function relinkColorAttrs(outerCont, cbOpt) {
16 var cont = cbOpt.container ?
17 Lib.nestedProperty(outerCont, cbOpt.container).get() :
18 outerCont;
19
20 if(cont) {
21 if(cont.coloraxis) {
22 // stash ref to color axis
23 cont._colorAx = fullLayout[cont.coloraxis];
24 } else {
25 var cOpts = extractOpts(cont);
26 var isAuto = cOpts.auto;
27
28 if(isAuto || cOpts.min === undefined) {
29 replace(cont, cbOpt.min);
30 }
31 if(isAuto || cOpts.max === undefined) {
32 replace(cont, cbOpt.max);
33 }
34 if(cOpts.autocolorscale) {
35 replace(cont, 'colorscale');
36 }
37 }
38 }
39 }
40
41 for(var i = 0; i < fullData.length; i++) {
42 var trace = fullData[i];

Callers 1

Calls 2

extractOptsFunction · 0.85
replaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…