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

Function determineFont

src/traces/bar/style.js:97–109  ·  view source on GitHub ↗
(tx, d, trace, gd)

Source from the content-addressed store, hash-verified

95}
96
97function determineFont(tx, d, trace, gd) {
98 var layoutFont = gd._fullLayout.font;
99 var textFont = trace.textfont;
100
101 if(tx.classed('bartext-inside')) {
102 var barColor = getBarColor(d, trace);
103 textFont = getInsideTextFont(trace, d.i, layoutFont, barColor);
104 } else if(tx.classed('bartext-outside')) {
105 textFont = getOutsideTextFont(trace, d.i, layoutFont);
106 }
107
108 return textFont;
109}
110
111function getTextFont(trace, index, defaultValue) {
112 return getFontValue(

Callers 2

styleTextPointsFunction · 0.85
styleTextInSelectionModeFunction · 0.85

Calls 3

getBarColorFunction · 0.85
getInsideTextFontFunction · 0.85
getOutsideTextFontFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…