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

Function yForAngle

src/scales/scale.radialLinear.js:222–229  ·  view source on GitHub ↗
(y, h, angle)

Source from the content-addressed store, hash-verified

220}
221
222function yForAngle(y, h, angle) {
223 if (angle === 90 || angle === 270) {
224 y -= (h / 2);
225 } else if (angle > 270 || angle < 90) {
226 y -= h;
227 }
228 return y;
229}
230
231function drawPointLabelBox(ctx, opts, item) {
232 const {left, top, right, bottom} = item;

Callers 1

createPointLabelItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected