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

Function _getTarget

src/plugins/plugin.filler/filler.target.js:13–35  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

11 */
12
13export function _getTarget(source) {
14 const {chart, fill, line} = source;
15
16 if (isFinite(fill)) {
17 return getLineByIndex(chart, fill);
18 }
19
20 if (fill === 'stack') {
21 return _buildStackLine(source);
22 }
23
24 if (fill === 'shape') {
25 return true;
26 }
27
28 const boundary = computeBoundary(source);
29
30 if (boundary instanceof simpleArc) {
31 return boundary;
32 }
33
34 return _createBoundaryLine(boundary, line);
35}
36
37/**
38 * @param {Chart} chart

Callers 1

_drawfillFunction · 0.90

Calls 4

_buildStackLineFunction · 0.90
_createBoundaryLineFunction · 0.90
getLineByIndexFunction · 0.85
computeBoundaryFunction · 0.85

Tested by

no test coverage detected