MCPcopy Create free account
hub / github.com/plotly/plotly.js / sceneOptions

Function sceneOptions

src/traces/scattergl/calc.js:141–185  ·  view source on GitHub ↗
(gd, subplot, trace, positions, x, y)

Source from the content-addressed store, hash-verified

139}
140
141function sceneOptions(gd, subplot, trace, positions, x, y) {
142 var opts = convert.style(gd, trace);
143
144 if(opts.marker) {
145 opts.marker.positions = positions;
146 }
147
148 if(opts.line && positions.length > 1) {
149 Lib.extendFlat(
150 opts.line,
151 convert.linePositions(gd, trace, positions)
152 );
153 }
154
155 if(opts.errorX || opts.errorY) {
156 var errors = convert.errorBarPositions(gd, trace, positions, x, y);
157
158 if(opts.errorX) {
159 Lib.extendFlat(opts.errorX, errors.x);
160 }
161 if(opts.errorY) {
162 Lib.extendFlat(opts.errorY, errors.y);
163 }
164 }
165
166 if(opts.text) {
167 Lib.extendFlat(
168 opts.text,
169 {positions: positions},
170 convert.textPosition(gd, trace, opts.text, opts.marker)
171 );
172 Lib.extendFlat(
173 opts.textSel,
174 {positions: positions},
175 convert.textPosition(gd, trace, opts.text, opts.markerSel)
176 );
177 Lib.extendFlat(
178 opts.textUnsel,
179 {positions: positions},
180 convert.textPosition(gd, trace, opts.text, opts.markerUnsel)
181 );
182 }
183
184 return opts;
185}

Callers 1

calc.jsFile · 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…