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

Function _getTargetValue

src/plugins/plugin.filler/filler.options.js:101–115  ·  view source on GitHub ↗
(fill, scale, startValue)

Source from the content-addressed store, hash-verified

99 * @returns {number | undefined}
100 */
101export function _getTargetValue(fill, scale, startValue) {
102 let value;
103
104 if (fill === 'start') {
105 value = startValue;
106 } else if (fill === 'end') {
107 value = scale.options.reverse ? scale.min : scale.max;
108 } else if (isObject(fill)) {
109 // @ts-ignore
110 value = fill.value;
111 } else {
112 value = scale.getBaseValue();
113 }
114 return value;
115}
116
117/**
118 * @param {LineElement} line

Callers 1

computeCircularBoundaryFunction · 0.90

Calls 2

isObjectFunction · 0.85
getBaseValueMethod · 0.65

Tested by

no test coverage detected