Skip to content

Commit

Permalink
when dataset empty, set scale min max to default if null
Browse files Browse the repository at this point in the history
  • Loading branch information
xg-wang committed May 14, 2017
1 parent 20452dd commit 7d89160
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scales/scale.linear.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ module.exports = function(Chart) {
});
}

me.min = isFinite(me.min) ? me.min : DEFAULT_MIN;
me.max = isFinite(me.max) ? me.max : DEFAULT_MAX;
me.min = (me.min !== null && isFinite(me.min)) ? me.min : DEFAULT_MIN;
me.max = (me.max !== null && isFinite(me.max)) ? me.max : DEFAULT_MAX;

// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
this.handleTickRangeOptions();
Expand Down

0 comments on commit 7d89160

Please sign in to comment.