MCPcopy
hub / github.com/plotly/plotly.js / makePullColorFn

Function makePullColorFn

src/traces/pie/calc.js:90–102  ·  view source on GitHub ↗
(colorMap)

Source from the content-addressed store, hash-verified

88}
89
90function makePullColorFn(colorMap) {
91 return function pullColor(color, id) {
92 if(!color) return false;
93
94 color = tinycolor(color);
95 if(!color.isValid()) return false;
96
97 color = Color.addOpacity(color, color.getAlpha());
98 if(!colorMap[id]) colorMap[id] = color;
99
100 return color;
101 };
102}
103
104/*
105 * `calc` filled in (and collated) explicit colors.

Callers 2

calc.jsFile · 0.85
calcFunction · 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…