handleTickRangeOptions() {
const me = this;
- const {beginAtZero, stacked} = me.options;
+ const {beginAtZero} = me.options;
const {minDefined, maxDefined} = me.getUserBounds();
let {min, max} = me;
const setMin = v => (min = minDefined ? min : v);
const setMax = v => (max = maxDefined ? max : v);
- if (beginAtZero || stacked) {
+ if (beginAtZero) {
const minSign = sign(min);
const maxSign = sign(max);
chart.scales.y.options.stacked = true;
chart.update();
+ expect(chart.scales.y.min).toBe(30);
+ expect(chart.scales.y.max).toBe(90);
+
+ chart.scales.y.options.beginAtZero = true;
+ chart.update();
+
expect(chart.scales.y.min).toBe(0);
expect(chart.scales.y.max).toBe(90);
});