MCPcopy Index your code
hub / github.com/plotly/plotly.js / getInscribedRadiusFraction

Function getInscribedRadiusFraction

src/traces/sunburst/plot.js:644–651  ·  view source on GitHub ↗
(pt)

Source from the content-addressed store, hash-verified

642};
643
644function getInscribedRadiusFraction(pt) {
645 if (pt.rpx0 === 0 && Lib.isFullCircle([pt.x0, pt.x1])) {
646 // special case of 100% with no hole
647 return 1;
648 } else {
649 return Math.max(0, Math.min(1 / (1 + 1 / Math.sin(pt.halfangle)), pt.ring / 2));
650 }
651}
652
653function getTextXY(d) {
654 return getCoords(d.rpx1, d.transform.textPosAngle);

Callers 1

plotOneFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…