MCPcopy Create free account
hub / github.com/plotly/plotly.js / positionTitleInside

Function positionTitleInside

src/traces/pie/plot.js:866–875  ·  view source on GitHub ↗
(cd0)

Source from the content-addressed store, hash-verified

864}
865
866function positionTitleInside(cd0) {
867 var textDiameter = Math.sqrt(cd0.titleBox.width * cd0.titleBox.width + cd0.titleBox.height * cd0.titleBox.height);
868 return {
869 x: cd0.cx,
870 y: cd0.cy,
871 scale: (cd0.trace.hole * cd0.r * 2) / textDiameter,
872 tx: 0,
873 ty: -cd0.titleBox.height / 2 + cd0.trace.title.font.size
874 };
875}
876
877function positionTitleOutside(cd0, plotSize) {
878 var scaleX = 1;

Callers 1

plotFunction · 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…