Skip to content

Commit

Permalink
[axis] Fix #4097 (enable min/max to be set as Date when using time axis)
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Oct 18, 2016
1 parent 262f45e commit d705b69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/coord/axisModelZoomMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ define(function (require) {
var option = this.option;
var min = option.rangeStart != null ? option.rangeStart : option.min;
// In case of axis.type === 'time', Date should be converted to timestamp.
// In other cases, min/max should be a number or null/undefined.
if (min != null) {
// In other cases, min/max should be a number or null/undefined or 'dataMin/Max'.
if (min instanceof Date) {
min = +min;
}
return min;
Expand All @@ -25,8 +25,8 @@ define(function (require) {
var option = this.option;
var max = option.rangeEnd != null ? option.rangeEnd : option.max;
// In case of axis.type === 'time', Date should be converted to timestamp.
// In other cases, min/max should be a number or null/undefined.
if (max != null) {
// In other cases, min/max should be a number or null/undefined or 'dataMin/Max'.
if (max instanceof Date) {
max = +max;
}
return max;
Expand Down

0 comments on commit d705b69

Please sign in to comment.