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

Function calcMaxHalfSize

src/traces/pie/plot.js:836–839  ·  view source on GitHub ↗
(a, halfAngle, r, ring)

Source from the content-addressed store, hash-verified

834}
835
836function calcMaxHalfSize(a, halfAngle, r, ring) {
837 var q = a + 1 / (2 * Math.tan(halfAngle));
838 return r * Math.min(1 / (Math.sqrt(q * q + 0.5) + q), ring / (Math.sqrt(a * a + ring / 2) + a));
839}
840
841function getInscribedRadiusFraction(pt, cd0) {
842 if (pt.v === cd0.vTotal && !cd0.trace.hole) return 1; // special case of 100% with no hole

Callers 2

calcRadTransformFunction · 0.85
calcTanTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…