This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/next by this push:
     new a1ce568  fix: revert the break change brought by 
0b5b67f4f17c2f3abc48c466bff0923e36e72892 ( default value rule of 
toolbox.dataZoom. xAxis/yAxis )
a1ce568 is described below

commit a1ce56815d29e3dfe2eb1e9dec26095fe235aca2
Author: 100pah <sushuang0...@gmail.com>
AuthorDate: Mon Jul 27 13:40:37 2020 +0800

    fix: revert the break change brought by 
0b5b67f4f17c2f3abc48c466bff0923e36e72892 ( default value rule of 
toolbox.dataZoom. xAxis/yAxis )
---
 src/component/toolbox/feature/DataZoom.ts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/component/toolbox/feature/DataZoom.ts 
b/src/component/toolbox/feature/DataZoom.ts
index a69b92f..688a14c 100644
--- a/src/component/toolbox/feature/DataZoom.ts
+++ b/src/component/toolbox/feature/DataZoom.ts
@@ -244,13 +244,15 @@ function makeAxisFinder(dzFeatureModel: 
ToolboxDataZoomFeatureModel): ModelFinde
         yAxisId: dzFeatureModel.get('yAxisId', true)
     } as ModelFinderObject;
 
-    // If not specified, it means use all axes.
-    if (setting.xAxisIndex == null
-        && setting.yAxisIndex == null
-        && setting.xAxisId == null
-        && setting.yAxisId == null
-    ) {
-        setting.xAxisIndex = setting.yAxisIndex = 'all';
+    // If both `xAxisIndex` `xAxisId` not set, it means 'all'.
+    // If both `yAxisIndex` `yAxisId` not set, it means 'all'.
+    // Some old cases set like this below to close yAxis control but leave 
xAxis control:
+    // `{ feature: { dataZoom: { yAxisIndex: false } }`.
+    if (setting.xAxisIndex == null && setting.xAxisId == null) {
+        setting.xAxisIndex = 'all';
+    }
+    if (setting.yAxisIndex == null && setting.yAxisId == null) {
+        setting.yAxisIndex = 'all';
     }
 
     return setting;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to