(d)
| 274 | } |
| 275 | |
| 276 | function styleWaterfalls(d) { |
| 277 | var trace = d[0].trace; |
| 278 | var isWaterfall = trace.type === 'waterfall'; |
| 279 | |
| 280 | if (d[0]._distinct && isWaterfall) { |
| 281 | var cont = d[0].trace[d[0].dir].marker; |
| 282 | d[0].mc = cont.color; |
| 283 | d[0].mlw = cont.line.width; |
| 284 | d[0].mlc = cont.line.color; |
| 285 | return styleBarLike(d, this, 'waterfall'); |
| 286 | } |
| 287 | |
| 288 | var ptsData = []; |
| 289 | if (trace.visible && isWaterfall) { |
| 290 | ptsData = d[0].hasTotals |
| 291 | ? [ |
| 292 | ['increasing', 'M-6,-6V6H0Z'], |
| 293 | ['totals', 'M6,6H0L-6,-6H-0Z'], |
| 294 | ['decreasing', 'M6,6V-6H0Z'] |
| 295 | ] |
| 296 | : [ |
| 297 | ['increasing', 'M-6,-6V6H6Z'], |
| 298 | ['decreasing', 'M6,6V-6H-6Z'] |
| 299 | ]; |
| 300 | } |
| 301 | |
| 302 | var pts = d3.select(this).select('g.legendpoints').selectAll('path.legendwaterfall').data(ptsData); |
| 303 | pts.enter() |
| 304 | .append('path') |
| 305 | .classed('legendwaterfall', true) |
| 306 | .attr('transform', centerTransform) |
| 307 | .style('stroke-miterlimit', 1); |
| 308 | pts.exit().remove(); |
| 309 | |
| 310 | pts.each(function (dd) { |
| 311 | var pt = d3.select(this); |
| 312 | var cont = trace[dd[0]].marker; |
| 313 | var lw = boundLineWidth(undefined, cont.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH); |
| 314 | |
| 315 | pt.attr('d', dd[1]) |
| 316 | .style('stroke-width', lw + 'px') |
| 317 | .call(Color.fill, cont.color); |
| 318 | |
| 319 | if (lw) { |
| 320 | pt.call(Color.stroke, cont.line.color); |
| 321 | } |
| 322 | }); |
| 323 | } |
| 324 | |
| 325 | function styleBars(d) { |
| 326 | styleBarLike(d, this); |
nothing calls this directly
no test coverage detected
searching dependent graphs…