You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/10/29 03:58:46 UTC
[incubator-echarts] 02/02: fix: [dataZoom] fix auto axis detection
bug brought by 5.0 refactor.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch timeline-scale
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit af508e8a70f8b0ee4b23b6880f409cb9ed547ce2
Author: 100pah <su...@gmail.com>
AuthorDate: Thu Oct 29 11:56:32 2020 +0800
fix: [dataZoom] fix auto axis detection bug brought by 5.0 refactor.
---
src/component/dataZoom/DataZoomModel.ts | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/component/dataZoom/DataZoomModel.ts b/src/component/dataZoom/DataZoomModel.ts
index 877851f..08076e9 100644
--- a/src/component/dataZoom/DataZoomModel.ts
+++ b/src/component/dataZoom/DataZoomModel.ts
@@ -18,7 +18,6 @@
*/
import { each, createHashMap, merge, HashMap, assert } from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
import AxisProxy from './AxisProxy';
import ComponentModel from '../../model/Component';
import {
@@ -240,10 +239,9 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
private _doInit(inputRawOption: Opts): void {
const thisOption = this.option;
- // Disable realtime view update if canvas is not supported.
- if (!env.canvasSupported) {
- thisOption.realtime = false;
- }
+ // if (!env.canvasSupported) {
+ // thisOption.realtime = false;
+ // }
this._setDefaultThrottle(inputRawOption);
@@ -354,7 +352,7 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
if (needAuto) {
// If no parallel axis, find the first category axis as default. (Also consider polar).
each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {
- if (needAuto) {
+ if (!needAuto) {
return;
}
const axisModels = ecModel.findComponents({
@@ -365,6 +363,7 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
const axisInfo = new DataZoomAxisInfo();
axisInfo.add(axisModels[0].componentIndex);
targetAxisIndexMap.set(axisDim, axisInfo);
+ needAuto = false;
}
}, this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org