From 977e6195d7d6a48769563cf90bfc307fb2ef6f2d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 十一月 2023 22:29:32 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/chart/antv-bar/index.jsx |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx
index 332e3ab..ad556b3 100644
--- a/src/menu/components/chart/antv-bar/index.jsx
+++ b/src/menu/components/chart/antv-bar/index.jsx
@@ -550,7 +550,8 @@
       })
     }
 
-    if (!plot.legend || plot.legend === 'hidden') {
+    let noLegend = !plot.legend || plot.legend === 'hidden'
+    if (noLegend) {
       chart.legend(false)
     } else {
       chart.legend({
@@ -643,7 +644,9 @@
       }
       view1.axis('value', yc)
   
-      // view1.legend(false)
+      if (!noLegend) {
+        view1.legend(false)
+      }
   
       if (plot.mutilBar !== 'stack') {
         let _chart = view1
@@ -770,7 +773,9 @@
 
     view2.data(dv.rows)
 
-    // view2.legend(false)
+    if (!noLegend) {
+      view2.legend(false)
+    }
 
     fields.forEach(item => {
       if (item.chartType === 'bar' && !Bar_axis.length) {

--
Gitblit v1.8.0