MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _getSegmentMethod

Function _getSegmentMethod

src/elements/element.line.js:185–190  ·  view source on GitHub ↗

* @param {LineElement} line - the line * @returns {function} * @private

(line)

Source from the content-addressed store, hash-verified

183 * @private
184 */
185function _getSegmentMethod(line) {
186 const opts = line.options;
187 const borderDash = opts.borderDash && opts.borderDash.length;
188 const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;
189 return useFastPath ? fastPathSegment : pathSegment;
190}
191
192/**
193 * @private

Callers 3

strokePathDirectFunction · 0.85
pathSegmentMethod · 0.85
pathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected