From a13b2a8d6e84662275ea913850e01be9b2ff31e5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 八月 2021 00:24:31 +0800
Subject: [PATCH] 2021-08-13

---
 src/menu/components/chart/antv-scatter/index.jsx |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/chart/antv-scatter/index.jsx b/src/menu/components/chart/antv-scatter/index.jsx
index b9ae970..9a7b1f3 100644
--- a/src/menu/components/chart/antv-scatter/index.jsx
+++ b/src/menu/components/chart/antv-scatter/index.jsx
@@ -187,16 +187,11 @@
     const { card } = this.state
     const plot = card.plot
     const data = this.getdata()
-    let height = plot.height - 25
-
-    if (card.plot.title || card.search.length > 0) {
-      height = plot.height - 70
-    }
 
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height
+      height: this.wrap.offsetHeight - 25
     })
 
     chart.data(data);
@@ -393,7 +388,7 @@
           <Icon type="tool" />
         </Popover>
         {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
-        <div className="canvas" id={card.uuid + 'canvas'}></div>
+        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
         {appType !== 'mob' ? <ActionComponent type="chart" config={card} updateaction={this.updateComponent}/> : null}
       </div>
     )

--
Gitblit v1.8.0