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

Function styleTrace

src/traces/scattergeo/style.js:15–39  ·  view source on GitHub ↗
(gd, calcTrace)

Source from the content-addressed store, hash-verified

13};
14
15function styleTrace(gd, calcTrace) {
16 var trace = calcTrace[0].trace;
17 var s = calcTrace[0].node3;
18
19 s.style('opacity', calcTrace[0].trace.opacity);
20
21 stylePoints(s, trace, gd);
22 styleText(s, trace, gd);
23
24 // this part is incompatible with Drawing.lineGroupStyle
25 s.selectAll('path.js-line')
26 .style('fill', 'none')
27 .each(function(d) {
28 var path = d3.select(this);
29 var trace = d.trace;
30 var line = trace.line || {};
31
32 path.call(Color.stroke, line.color)
33 .call(Drawing.dashLine, line.dash || '', line.width || 0);
34
35 if(trace.fill !== 'none') {
36 path.call(Color.fill, trace.fillcolor);
37 }
38 });
39}

Callers 1

style.jsFile · 0.70

Calls 2

styleTextFunction · 0.85
stylePointsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…