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

Skip to content

Commit 445e80a

Browse files
committed
Re-set autobins after supplying defaulys if initially set
1 parent d33bf8d commit 445e80a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/plots/plots.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,15 @@ plots.supplyDefaults = function(gd) {
426426
trace = newData[i];
427427

428428
fullTrace = plots.supplyDataDefaults(trace, i, newFullLayout);
429+
430+
// If autobinned before, autobin again. supplyDataDefaults sees
431+
// the generated bin object and assumes it has been set manually
432+
// so we need to override that behaviour.
433+
if (oldFullData[i]){
434+
fullTrace.autobinx = oldFullData[i].autobinx || fullTrace.autobinx;
435+
fullTrace.autobiny = oldFullData[i].autobiny || fullTrace.autobiny;
436+
}
437+
429438
newFullData.push(fullTrace);
430439

431440
// DETECT 3D, Cartesian, and Polar

0 commit comments

Comments
 (0)