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

Method draw

src/elements/element.point.ts:89–100  ·  view source on GitHub ↗
(ctx: CanvasRenderingContext2D, area: ChartArea)

Source from the content-addressed store, hash-verified

87 }
88
89 draw(ctx: CanvasRenderingContext2D, area: ChartArea) {
90 const options = this.options;
91
92 if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {
93 return;
94 }
95
96 ctx.strokeStyle = options.borderColor;
97 ctx.lineWidth = options.borderWidth;
98 ctx.fillStyle = options.backgroundColor;
99 drawPoint(ctx, options, this.x, this.y);
100 }
101
102 getRange() {
103 const options = this.options || {};

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.95
_isPointInAreaFunction · 0.85
drawPointFunction · 0.85

Tested by

no test coverage detected