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

Function calcRadTransform

src/traces/pie/plot.js:802–813  ·  view source on GitHub ↗
(textBB, r, ring, halfAngle, midAngle)

Source from the content-addressed store, hash-verified

800}
801
802function calcRadTransform(textBB, r, ring, halfAngle, midAngle) {
803 r = Math.max(0, r - 2 * TEXTPAD);
804
805 // max size if text is rotated radially
806 var a = textBB.width / textBB.height;
807 var s = calcMaxHalfSize(a, halfAngle, r, ring);
808 return {
809 scale: (s * 2) / textBB.height,
810 rCenter: calcRCenter(a, s / r),
811 rotate: calcRotate(midAngle)
812 };
813}
814
815function calcTanTransform(textBB, r, ring, halfAngle, midAngle) {
816 r = Math.max(0, r - 2 * TEXTPAD);

Callers 2

considerCrossingFunction · 0.85
transformInsideTextFunction · 0.85

Calls 3

calcMaxHalfSizeFunction · 0.85
calcRCenterFunction · 0.85
calcRotateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…