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

Function appendTextNode

src/traces/bar/plot.js:538–552  ·  view source on GitHub ↗
(bar, text, font)

Source from the content-addressed store, hash-verified

536 var textPosition;
537
538 function appendTextNode(bar, text, font) {
539 var textSelection = Lib.ensureSingle(bar, 'text')
540 .text(text)
541 .attr({
542 class: 'bartext bartext-' + textPosition,
543 'text-anchor': 'middle',
544 // prohibit tex interpretation until we can handle
545 // tex and regular text together
546 'data-notex': 1
547 })
548 .call(Drawing.font, font)
549 .call(svgTextUtils.convertToTspans, gd);
550
551 return textSelection;
552 }
553
554 // get trace attributes
555 var trace = cd[0].trace;

Callers 1

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