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

Function calculateErrorParams

src/traces/scatter3d/convert.js:106–127  ·  view source on GitHub ↗
(errors)

Source from the content-addressed store, hash-verified

104}
105
106function calculateErrorParams(errors) {
107 var capSize = [0.0, 0.0, 0.0];
108 var color = [
109 [0, 0, 0],
110 [0, 0, 0],
111 [0, 0, 0]
112 ];
113 var lineWidth = [1.0, 1.0, 1.0];
114
115 for (var i = 0; i < 3; i++) {
116 var e = errors[i];
117
118 if (e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
119 if (!e || !e.visible) continue;
120
121 capSize[i] = e.width / 2; // ballpark rescaling
122 color[i] = str2RgbaArray(e.color);
123 lineWidth[i] = e.thickness;
124 }
125
126 return { capSize: capSize, color: color, lineWidth: lineWidth };
127}
128
129function parseAlignmentX(a) {
130 if (a === null || a === undefined) return 0;

Callers 1

convertPlotlyOptionsFunction · 0.85

Calls 1

str2RgbaArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…