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

Function getTraceWidth

src/components/legend/draw.js:505–515  ·  view source on GitHub ↗
(d, legendObj, textGap)

Source from the content-addressed store, hash-verified

503}
504
505function getTraceWidth(d, legendObj, textGap) {
506 var legendItem = d[0];
507 var legendWidth = legendItem.width;
508 var mode = legendObj.entrywidthmode;
509
510 var traceLegendWidth = legendItem.trace.legendwidth || legendObj.entrywidth;
511
512 if(mode === 'fraction') return legendObj._maxWidth * traceLegendWidth;
513
514 return textGap + (traceLegendWidth || legendWidth);
515}
516
517function clickOrDoubleClick(gd, legend, legendItem, numClicks, evt) {
518 var fullLayout = gd._fullLayout;

Callers 1

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