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

Function beforeDraw

src/plugins/plugin.filler/index.js:51–66  ·  view source on GitHub ↗
(chart, _args, options)

Source from the content-addressed store, hash-verified

49 },
50
51 beforeDraw(chart, _args, options) {
52 const draw = options.drawTime === 'beforeDraw';
53 const metasets = chart.getSortedVisibleDatasetMetas();
54 const area = chart.chartArea;
55 for (let i = metasets.length - 1; i >= 0; --i) {
56 const source = metasets[i].$filler;
57 if (!source) {
58 continue;
59 }
60
61 source.line.updateControlPoints(area, source.axis);
62 if (draw && source.fill) {
63 _drawfill(chart.ctx, source, area);
64 }
65 }
66 },
67
68 beforeDatasetsDraw(chart, _args, options) {
69 if (options.drawTime !== 'beforeDatasetsDraw') {

Callers

nothing calls this directly

Calls 3

_drawfillFunction · 0.90
updateControlPointsMethod · 0.65

Tested by

no test coverage detected