Skip to content

Commit d78c4bf

Browse files
committed
should display outlines of zero for funnels as well
1 parent 97190c3 commit d78c4bf

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: src/traces/bar/plot.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ module.exports = function plot(gd, plotinfo, cdModule, traceLayer, opts) {
6868
var plotGroup = d3.select(this);
6969
var trace = cd[0].trace;
7070
var isWaterfall = (trace.type === 'waterfall');
71+
var isFunnel = (trace.type === 'funnel');
7172
var isBar = (trace.type === 'bar');
73+
var shouldDisplayZeros = isBar || isFunnel;
7274

7375
var adjustPixel = 0;
7476
if(isWaterfall && trace.connector.visible && trace.connector.mode === 'between') {
@@ -106,8 +108,8 @@ module.exports = function plot(gd, plotinfo, cdModule, traceLayer, opts) {
106108
var isBlank = di.isBlank = !(
107109
isNumeric(x0) && isNumeric(x1) &&
108110
isNumeric(y0) && isNumeric(y1) &&
109-
(x0 !== x1 || (isBar && isHorizontal)) &&
110-
(y0 !== y1 || (isBar && !isHorizontal))
111+
(x0 !== x1 || (shouldDisplayZeros && isHorizontal)) &&
112+
(y0 !== y1 || (shouldDisplayZeros && !isHorizontal))
111113
);
112114

113115
// in waterfall mode `between` we need to adjust bar end points to match the connector width
218 Bytes
Loading
-1 Bytes
Loading

0 commit comments

Comments
 (0)