Skip to content
Browse files

Fix to allow 0 values for xMax, xMin, yMax, yMin.

  • Loading branch information...
1 parent 2db2c12 commit a226cd7ec66eb25bd539e9d0bb86aeb443773ca7 David Peredo committed Feb 6, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/chart.js
View
8 lib/chart.js
@@ -227,10 +227,10 @@ _.defaults(xChart.prototype, {
break;
}
- o.xMin = data.xMin || o.xMin;
- o.xMax = data.xMax || o.xMax;
- o.yMin = data.yMin || o.yMin;
- o.yMax = data.yMax || o.yMax;
+ if (data.xMin != null) o.xMin = data.xMin;
+ if (data.xMax != null) o.xMax = data.xMax;
+ if (data.yMin != null) o.yMin = data.yMin;
+ if (data.yMax != null) o.yMax = data.yMax;
if (self._vis) {
self._destroy(self._vis, self._mainStorage);

0 comments on commit a226cd7

Please sign in to comment.
Something went wrong with that request. Please try again.