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

Function parseFillOption

src/plugins/plugin.filler/filler.options.js:120–137  ·  view source on GitHub ↗

* @param {LineElement} line

(line)

Source from the content-addressed store, hash-verified

118 * @param {LineElement} line
119 */
120function parseFillOption(line) {
121 const options = line.options;
122 const fillOption = options.fill;
123 let fill = valueOrDefault(fillOption && fillOption.target, fillOption);
124
125 if (fill === undefined) {
126 fill = !!options.backgroundColor;
127 }
128
129 if (fill === false || fill === null) {
130 return false;
131 }
132
133 if (fill === true) {
134 return 'origin';
135 }
136 return fill;
137}

Callers 1

_decodeFillFunction · 0.85

Calls 1

valueOrDefaultFunction · 0.85

Tested by

no test coverage detected