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

Function getLineMethod

src/elements/element.line.ts:50–60  ·  view source on GitHub ↗
(options: AnyObject)

Source from the content-addressed store, hash-verified

48// The canvas helpers take a CanvasRenderingContext2D, but the line also draws into a Path2D
49// eslint-disable-next-line @typescript-eslint/no-explicit-any
50function getLineMethod(options: AnyObject): any {
51 if (options.stepped) {
52 return _steppedLineTo;
53 }
54
55 if (options.tension || options.cubicInterpolationMode === 'monotone') {
56 return _bezierCurveTo;
57 }
58
59 return lineTo;
60}
61
62function pathVars(points: PointElement[], segment: PathSegment, params: PathParams = {}) {
63 const count = points.length;

Callers 1

pathSegmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected