(d)
| 408 | } |
| 409 | |
| 410 | function styleBoxes(d) { |
| 411 | var trace = d[0].trace; |
| 412 | |
| 413 | var pts = d3 |
| 414 | .select(this) |
| 415 | .select('g.legendpoints') |
| 416 | .selectAll('path.legendbox') |
| 417 | .data(trace.visible && Registry.traceIs(trace, 'box-violin') ? [d] : []); |
| 418 | pts.enter() |
| 419 | .append('path') |
| 420 | .classed('legendbox', true) |
| 421 | // if we want the median bar, prepend M6,0H-6 |
| 422 | .attr('d', 'M6,6H-6V-6H6Z') |
| 423 | .attr('transform', centerTransform); |
| 424 | pts.exit().remove(); |
| 425 | |
| 426 | pts.each(function () { |
| 427 | var p = d3.select(this); |
| 428 | |
| 429 | if ( |
| 430 | (trace.boxpoints === 'all' || trace.points === 'all') && |
| 431 | Color.opacity(trace.fillcolor) === 0 && |
| 432 | Color.opacity((trace.line || {}).color) === 0 |
| 433 | ) { |
| 434 | var tMod = Lib.minExtend(trace, { |
| 435 | marker: { |
| 436 | size: constantItemSizing ? CST_MARKER_SIZE : Lib.constrain(trace.marker.size, 2, 16), |
| 437 | sizeref: 1, |
| 438 | sizemin: 1, |
| 439 | sizemode: 'diameter' |
| 440 | } |
| 441 | }); |
| 442 | pts.call(Drawing.pointStyle, tMod, gd); |
| 443 | } else { |
| 444 | var w = boundLineWidth(undefined, trace.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH); |
| 445 | |
| 446 | p.style('stroke-width', w + 'px').call(Color.fill, trace.fillcolor); |
| 447 | |
| 448 | if (w) Color.stroke(p, trace.line.color); |
| 449 | } |
| 450 | }); |
| 451 | } |
| 452 | |
| 453 | function styleCandles(d) { |
| 454 | var trace = d[0].trace; |
nothing calls this directly
no test coverage detected
searching dependent graphs…