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

Function drawLabel

src/components/sliders/draw.js:351–368  ·  view source on GitHub ↗
(item, data, sliderOpts)

Source from the content-addressed store, hash-verified

349}
350
351function drawLabel(item, data, sliderOpts) {
352 var text = Lib.ensureSingle(item, 'text', constants.labelClass, function(s) {
353 s.attr({
354 'text-anchor': 'middle',
355 'data-notex': 1
356 });
357 });
358
359 var tx = data.step.label;
360 var _meta = sliderOpts._gd._fullLayout._meta;
361 if(_meta) tx = Lib.templateString(tx, _meta);
362
363 text.call(Drawing.font, sliderOpts.font)
364 .text(tx)
365 .call(svgTextUtils.convertToTspans, sliderOpts._gd);
366
367 return text;
368}
369
370function drawLabelGroup(sliderGroup, sliderOpts) {
371 var labels = Lib.ensureSingle(sliderGroup, 'g', constants.labelsClass);

Callers 5

drawShapeFunction · 0.85
moveShapeFunction · 0.85
resizeShapeFunction · 0.85
findDimensionsFunction · 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…