We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7776305 commit 30a692eCopy full SHA for 30a692e
3 files changed
src/plots/cartesian/axis_defaults.js
@@ -95,25 +95,25 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
95
coerce('minallowed');
96
coerce('maxallowed');
97
var range = coerce('range');
98
-
99
var autorangeDflt = containerOut.getAutorangeDflt(range, options);
100
var autorange = coerce('autorange', autorangeDflt);
101
- var autorangeTrue;
+
+ var shouldAutorange;
102
103
// validate range and set autorange true for invalid partial ranges
104
if(range && (
105
(range[0] === null && range[1] === null) ||
106
- ((range[0] === null || range[1] === null) && autorange === 'reversed') ||
+ ((range[0] === null || range[1] === null) && (autorange === 'reversed' || autorange === true)) ||
107
(range[0] !== null && (autorange === 'min' || autorange === 'max reversed')) ||
108
(range[1] !== null && (autorange === 'max' || autorange === 'min reversed'))
109
)) {
110
range = undefined;
111
delete containerOut.range;
112
containerOut.autorange = true;
113
- autorangeTrue = true;
+ shouldAutorange = true;
114
}
115
116
- if(!autorangeTrue) {
+ if(!shouldAutorange) {
117
autorangeDflt = containerOut.getAutorangeDflt(range, options);
118
autorange = coerce('autorange', autorangeDflt);
119
src/plots/polar/layout_defaults.js
@@ -80,25 +80,24 @@ function handleDefaults(contIn, contOut, coerce, opts) {
80
coerceAxis('minallowed');
81
coerceAxis('maxallowed');
82
var range = coerceAxis('range');
83
84
var autorangeDflt = axOut.getAutorangeDflt(range);
85
var autorange = coerceAxis('autorange', autorangeDflt);
86
87
88
89
90
91
92
93
94
delete axOut.range;
axOut.autorange = true;
autorangeDflt = axOut.getAutorangeDflt(range);
autorange = coerceAxis('autorange', autorangeDflt);
test/jasmine/tests/axes_test.js
@@ -729,9 +729,11 @@ describe('Test axes', function() {
729
yaxis7: { range: [null, 2], autorange: 'min reversed' }, // first range is null not second
730
yaxis8: { range: [1, null], autorange: 'reversed' },
731
yaxis9: { range: [null, 2], autorange: 'reversed' },
732
+ yaxis10: { range: [1, null], autorange: true },
733
+ yaxis11: { range: [null, 2], autorange: true },
734
};
- layoutOut._subplots.cartesian.push('x2y2', 'xy3', 'x3y4', 'x3y5', 'x3y6', 'x3y7', 'x3y9', 'x3y9');
- layoutOut._subplots.yaxis.push('x2', 'x3', 'y2', 'y3', 'y4', 'y5', 'y6', 'y7', 'y8', 'y9');
735
+ layoutOut._subplots.cartesian.push('x2y2', 'xy3', 'x3y4', 'x3y5', 'x3y6', 'x3y7', 'x3y9', 'x3y9', 'x3y10', 'x3y11');
736
+ layoutOut._subplots.yaxis.push('x2', 'x3', 'y2', 'y3', 'y4', 'y5', 'y6', 'y7', 'y8', 'y9', 'y10', 'y11');
737
738
supplyLayoutDefaults(layoutIn, layoutOut, fullData);
739
0 commit comments