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

Function _resolveTarget

src/plugins/plugin.filler/filler.options.js:10–39  ·  view source on GitHub ↗
(sources, index, propagate)

Source from the content-addressed store, hash-verified

8 */
9
10export function _resolveTarget(sources, index, propagate) {
11 const source = sources[index];
12 let fill = source.fill;
13 const visited = [index];
14 let target;
15
16 if (!propagate) {
17 return fill;
18 }
19
20 while (fill !== false && visited.indexOf(fill) === -1) {
21 if (!isFinite(fill)) {
22 return fill;
23 }
24
25 target = sources[fill];
26 if (!target) {
27 return false;
28 }
29
30 if (target.visible) {
31 return fill;
32 }
33
34 visited.push(fill);
35 fill = target.fill;
36 }
37
38 return false;
39}
40
41/**
42 * @param {LineElement} line

Callers 1

afterDatasetsUpdateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected