assertEquals([12, 18], g.xAxisRange());
assertEquals([10, 40], g.yAxisRange(0));
+ g.updateOptions({ valueRange: [10, null] });
+ assertEquals([12, 18], g.xAxisRange());
+ assertEquals([10, 44.2], g.yAxisRange(0));
+
+ g.updateOptions({ valueRange: [10, 40] });
+ assertEquals([12, 18], g.xAxisRange());
+ assertEquals([10, 40], g.yAxisRange(0));
+
+ g.updateOptions({ valueRange: [10, undefined] });
+ assertEquals([12, 18], g.xAxisRange());
+ assertEquals([10, 44.2], g.yAxisRange(0));
+
+ g.updateOptions({ valueRange: [10, 40] });
+ assertEquals([12, 18], g.xAxisRange());
+ assertEquals([10, 40], g.yAxisRange(0));
+
g.updateOptions({ });
assertEquals([12, 18], g.xAxisRange());
assertEquals([10, 40], g.yAxisRange(0));
} else if (axis.valueRange) {
// This is a user-set value range for this axis.
axis.computedValueRange = [
- !isNaN(axis.valueRange[0]) ? axis.valueRange[0] : axis.extremeRange[0],
- !isNaN(axis.valueRange[1]) ? axis.valueRange[1] : axis.extremeRange[1]
+ !isNaN(axis.valueRange[0]) && axis.valueRange[0] !== null && axis.valueRange[0] !== undefined ? axis.valueRange[0] : axis.extremeRange[0],
+ !isNaN(axis.valueRange[1]) && axis.valueRange[1] !== null && axis.valueRange[1] !== undefined ? axis.valueRange[1] : axis.extremeRange[1]
];
} else {
axis.computedValueRange = axis.extremeRange;