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

Function getStyleGuide

src/components/legend/style.js:683–717  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

681}
682
683function getStyleGuide(d) {
684 var trace = d[0].trace;
685 var contours = trace.contours;
686 var showLine = subTypes.hasLines(trace);
687 var showMarker = subTypes.hasMarkers(trace);
688
689 var showFill = trace.visible && trace.fill && trace.fill !== 'none';
690 var showGradientLine = false;
691 var showGradientFill = false;
692
693 if (contours) {
694 var coloring = contours.coloring;
695
696 if (coloring === 'lines') {
697 showGradientLine = true;
698 } else {
699 showLine = coloring === 'none' || coloring === 'heatmap' || contours.showlines;
700 }
701
702 if (contours.type === 'constraint') {
703 showFill = contours._operation !== '=';
704 } else if (coloring === 'fill' || coloring === 'heatmap') {
705 showGradientFill = true;
706 }
707 }
708 return {
709 showMarker: showMarker,
710 showLine: showLine,
711 showFill: showFill,
712 showGradientLine: showGradientLine,
713 showGradientFill: showGradientFill,
714 anyLine: showLine || showGradientLine,
715 anyFill: showFill || showGradientFill
716 };
717}
718
719function dimAttr(v, dflt, max) {
720 if (v && Lib.isArrayOrTypedArray(v)) return dflt;

Callers 2

styleLinesFunction · 0.85
stylePointsFunction · 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…