Skip to content

Commit 36cb0fa

Browse files
committed
do not set autorange to false in constraints.handleDefaults for parial null inputs
1 parent 699fb78 commit 36cb0fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/plots/cartesian/constraints.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ exports.handleDefaults = function(layoutIn, layoutOut, opts) {
145145
// special logic for coupling of range and autorange
146146
// if nobody explicitly specifies autorange, but someone does
147147
// explicitly specify range, autorange must be disabled.
148-
if(attr === 'range' && val) {
148+
if(attr === 'range' && val &&
149+
axIn.range &&
150+
axIn.range.length === 2 &&
151+
axIn.range[0] !== null &&
152+
axIn.range[1] !== null
153+
) {
149154
hasRange = true;
150155
}
151156
if(attr === 'autorange' && val === null && hasRange) {

0 commit comments

Comments
 (0)