Skip to content

Commit

Permalink
fix axis min-max function in dataZoom #6465
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Aug 22, 2017
1 parent 708bf2b commit 12cc0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/dataZoom/AxisProxy.js
Expand Up @@ -392,15 +392,15 @@ define(function(require) {
var isCategoryAxis = axisModel.get('type') === 'category';
var axisDataLen = isCategoryAxis && (axisModel.get('data') || []).length;

if (min != null && min !== 'dataMin') {
if (min != null && min !== 'dataMin' && typeof min !== 'function') {
dataExtent[0] = min;
}
else if (isCategoryAxis) {
dataExtent[0] = axisDataLen > 0 ? 0 : NaN;
}

var max = axisModel.getMax(true);
if (max != null && max !== 'dataMax') {
if (max != null && max !== 'dataMax' && typeof max !== 'function') {
dataExtent[1] = max;
}
else if (isCategoryAxis) {
Expand Down

0 comments on commit 12cc0a0

Please sign in to comment.