(gd)
| 14 | var helpers = require('./helpers'); |
| 15 | |
| 16 | function style(gd) { |
| 17 | var s = d3.select(gd).selectAll('g[class^="barlayer"]').selectAll('g.trace'); |
| 18 | resizeText(gd, s, 'bar'); |
| 19 | |
| 20 | var barcount = s.size(); |
| 21 | var fullLayout = gd._fullLayout; |
| 22 | |
| 23 | // trace styling |
| 24 | s.style('opacity', function(d) { return d[0].trace.opacity; }) |
| 25 | |
| 26 | // for gapless (either stacked or neighboring grouped) bars use |
| 27 | // crispEdges to turn off antialiasing so an artificial gap |
| 28 | // isn't introduced. |
| 29 | .each(function(d) { |
| 30 | if((fullLayout.barmode === 'stack' && barcount > 1) || |
| 31 | (fullLayout.bargap === 0 && |
| 32 | fullLayout.bargroupgap === 0 && |
| 33 | !d[0].trace.marker.line.width)) { |
| 34 | d3.select(this).attr('shape-rendering', 'crispEdges'); |
| 35 | } |
| 36 | }); |
| 37 | |
| 38 | s.selectAll('g.points').each(function(d) { |
| 39 | var sel = d3.select(this); |
| 40 | var trace = d[0].trace; |
| 41 | stylePoints(sel, trace, gd); |
| 42 | }); |
| 43 | |
| 44 | Registry.getComponentMethod('errorbars', 'style')(s); |
| 45 | } |
| 46 | |
| 47 | function stylePoints(sel, trace, gd) { |
| 48 | Drawing.pointStyle(sel.selectAll('path'), trace, gd); |
nothing calls this directly
no test coverage detected
searching dependent graphs…