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

Skip to content

Commit 646a6bc

Browse files
committed
flipping logic to check user-def bin groups...
1 parent 4404f94 commit 646a6bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/traces/histogram/calc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,10 @@ function calcAllAutoBins(gd, trace, pa, mainData, _overlayEdgeCase) {
308308

309309
// Edge case: single-valued histogram overlaying others
310310
// Use them all together to calculate the bin size for the single-valued one
311+
// Don't re-calculate bin width if user manually specified it (checing in bingroup=='' or xbins is defined)
311312
if(isOverlay && !Registry.traceIs(trace, '2dMap') && newBinSpec._dataSpan === 0 &&
312313
pa.type !== 'category' && pa.type !== 'multicategory' &&
313-
trace.bingroup !== '' && (typeof trace.xbins !== 'undefined')) {
314+
trace.bingroup === '' && (typeof trace.xbins === 'undefined')) {
314315
// Several single-valued histograms! Stop infinite recursion,
315316
// just return an extra flag that tells handleSingleValueOverlays
316317
// to sort out this trace too

0 commit comments

Comments
 (0)