Skip to content

Commit 699fb78

Browse files
committed
keep null items in range when calling cleanRange
1 parent 086282c commit 699fb78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plots/cartesian/set_convert.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ module.exports = function setConvert(ax, fullLayout) {
486486
return;
487487
}
488488

489+
var nullRange0 = range[0] === null;
490+
var nullRange1 = range[1] === null;
491+
489492
if(ax.type === 'date' && !ax.autorange) {
490493
// check if milliseconds or js date objects are provided for range
491494
// and convert to date strings
@@ -510,7 +513,7 @@ module.exports = function setConvert(ax, fullLayout) {
510513
}
511514
} else {
512515
if(!isNumeric(range[i])) {
513-
if(isNumeric(range[1 - i])) {
516+
if(!(nullRange0 || nullRange1) && isNumeric(range[1 - i])) {
514517
range[i] = range[1 - i] * (i ? 10 : 0.1);
515518
} else {
516519
ax[rangeAttr] = dflt;

0 commit comments

Comments
 (0)