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

Function style

src/traces/scatter/style.js:7–33  ·  view source on GitHub ↗
(gd)

Source from the content-addressed store, hash-verified

5var Registry = require('../../registry');
6
7function style(gd) {
8 var s = d3.select(gd).selectAll('g.trace.scatter');
9
10 s.style('opacity', function(d) {
11 return d[0].trace.opacity;
12 });
13
14 s.selectAll('g.points').each(function(d) {
15 var sel = d3.select(this);
16 var trace = d.trace || d[0].trace;
17 stylePoints(sel, trace, gd);
18 });
19
20 s.selectAll('g.text').each(function(d) {
21 var sel = d3.select(this);
22 var trace = d.trace || d[0].trace;
23 styleText(sel, trace, gd);
24 });
25
26 s.selectAll('g.trace path.js-line')
27 .call(Drawing.lineGroupStyle);
28
29 s.selectAll('g.trace path.js-fill')
30 .call(Drawing.fillGroupStyle, gd, false);
31
32 Registry.getComponentMethod('errorbars', 'style')(s);
33}
34
35function stylePoints(sel, trace, gd) {
36 Drawing.pointStyle(sel.selectAll('path.point'), trace, gd);

Callers 1

plotFunction · 0.50

Calls 2

styleTextFunction · 0.85
stylePointsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…