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

Function style

src/traces/waterfall/style.js:12–47  ·  view source on GitHub ↗
(gd, cd, sel)

Source from the content-addressed store, hash-verified

10var styleTextPoints = barStyle.styleTextPoints;
11
12function style(gd, cd, sel) {
13 var s = sel ? sel : d3.select(gd).selectAll('g[class^="waterfalllayer"]').selectAll('g.trace');
14 resizeText(gd, s, 'waterfall');
15
16 s.style('opacity', function(d) { return d[0].trace.opacity; });
17
18 s.each(function(d) {
19 var gTrace = d3.select(this);
20 var trace = d[0].trace;
21
22 gTrace.selectAll('.point > path').each(function(di) {
23 if(!di.isBlank) {
24 var cont = trace[di.dir].marker;
25
26 d3.select(this)
27 .call(Color.fill, cont.color)
28 .call(Color.stroke, cont.line.color)
29 .call(Drawing.dashLine, cont.line.dash, cont.line.width)
30 .style('opacity', trace.selectedpoints && !di.selected ? DESELECTDIM : 1);
31 }
32 });
33
34 styleTextPoints(gTrace, trace, gd);
35
36 gTrace.selectAll('.lines').each(function() {
37 var cont = trace.connector.line;
38
39 Drawing.lineGroupStyle(
40 d3.select(this).selectAll('path'),
41 cont.width,
42 cont.color,
43 cont.dash
44 );
45 });
46 });
47}
48
49module.exports = {
50 style: style

Callers

nothing calls this directly

Calls 2

resizeTextFunction · 0.85
styleTextPointsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…