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

Skip to content

Commit 755c143

Browse files
committed
make size0 fallback to 1,
- for better protection from infinity loops in Axes.autoTicks
1 parent c93dcb1 commit 755c143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ axes.autoBin = function(data, ax, nbins, is2d, calendar) {
518518
// fallback if ax.d2c output BADNUMs
519519
// e.g. when user try to plot categorical bins
520520
// on a layout.xaxis.type: 'linear'
521-
if(!isNumeric(size0)) size0 = 0;
521+
if(!isNumeric(size0)) size0 = 1;
522522
}
523523

524524
// piggyback off autotick code to make "nice" bin sizes

0 commit comments

Comments
 (0)