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

Function getText

src/traces/bar/plot.js:981–995  ·  view source on GitHub ↗
(fullLayout, cd, index, xa, ya)

Source from the content-addressed store, hash-verified

979}
980
981function getText(fullLayout, cd, index, xa, ya) {
982 var trace = cd[0].trace;
983 var texttemplate = trace.texttemplate;
984
985 var value;
986 if (texttemplate) {
987 value = calcTexttemplate(fullLayout, cd, index, xa, ya);
988 } else if (trace.textinfo) {
989 value = calcTextinfo(cd, index, xa, ya);
990 } else {
991 value = helpers.getValue(trace.text, index);
992 }
993
994 return helpers.coerceString(attributeText, value);
995}
996
997function getTextPosition(trace, index) {
998 var value = helpers.getValue(trace.textposition, index);

Callers 1

appendBarTextFunction · 0.85

Calls 2

calcTexttemplateFunction · 0.85
calcTextinfoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…