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

Function style

src/traces/funnel/style.js:12–51  ·  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^="funnellayer"]').selectAll('g.trace');
14 resizeText(gd, s, 'funnel');
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.marker;
25
26 d3.select(this)
27 .call(Color.fill, di.mc || cont.color)
28 .call(Color.stroke, di.mlc || cont.line.color)
29 .call(Drawing.dashLine, cont.line.dash, di.mlw || cont.line.width)
30 .style('opacity', trace.selectedpoints && !di.selected ? DESELECTDIM : 1);
31 }
32 });
33
34 styleTextPoints(gTrace, trace, gd);
35
36 gTrace.selectAll('.regions').each(function() {
37 d3.select(this).selectAll('path').style('stroke-width', 0).call(Color.fill, trace.connector.fillcolor);
38 });
39
40 gTrace.selectAll('.lines').each(function() {
41 var cont = trace.connector.line;
42
43 Drawing.lineGroupStyle(
44 d3.select(this).selectAll('path'),
45 cont.width,
46 cont.color,
47 cont.dash
48 );
49 });
50 });
51}
52
53module.exports = {
54 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…