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

Function makeTemplateVariables

src/traces/pie/plot.js:1253–1264  ·  view source on GitHub ↗
(pt)

Source from the content-addressed store, hash-verified

1251 }
1252
1253 function makeTemplateVariables(pt) {
1254 return {
1255 label: pt.label,
1256 value: pt.v,
1257 valueLabel: helpers.formatPieValue(pt.v, fullLayout.separators),
1258 percent: pt.v / cd0.vTotal,
1259 percentLabel: helpers.formatPiePercent(pt.v / cd0.vTotal, fullLayout.separators),
1260 color: pt.color,
1261 text: pt.text,
1262 customdata: Lib.castOption(trace, pt.i, 'customdata')
1263 };
1264 }
1265
1266 if (texttemplate) {
1267 var txt = Lib.castOption(trace, pt.i, 'texttemplate');

Callers 1

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