Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1ee8c2

Browse files
committed
add comment regarding not showing zero span bars
1 parent 7f3fb34 commit c1ee8c2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/traces/bar/plot.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,13 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
191191
}
192192

193193
function expandToVisible(v, vc, hideZeroSpan) {
194-
if(hideZeroSpan && v === vc) return v;
194+
if(hideZeroSpan && v === vc) {
195+
// should not expand zero span bars
196+
// when start and end positions are identical
197+
// i.e. for vertical when y0 === y1
198+
// and for horizontal when x0 === x1
199+
return v;
200+
}
195201

196202
// if it's not in danger of disappearing entirely,
197203
// round more precisely

0 commit comments

Comments
 (0)