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

Function calcMin

src/controllers/controller.doughnut.js:24–24  ·  view source on GitHub ↗
(angle, a, b)

Source from the content-addressed store, hash-verified

22 const endY = Math.sin(endAngle);
23 const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);
24 const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);
25 const maxX = calcMax(0, startX, endX);
26 const maxY = calcMax(HALF_PI, startY, endY);
27 const minX = calcMin(PI, startX, endX);

Callers 1

getRatioAndOffsetFunction · 0.85

Calls 1

_angleBetweenFunction · 0.85

Tested by

no test coverage detected