From 5ec0f02101cb4255c6398856bbf17a2a0b2c9a7e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 14 十一月 2022 17:33:55 +0800
Subject: [PATCH] 2022-11-14

---
 src/tabviews/custom/components/chart/antv-dashboard/index.jsx |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
index d7a1c32..2be8a1b 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -107,7 +107,9 @@
       }
     }
 
-    _config.style.height = config.plot.height || 400
+    _config.plot.height = Utils.getHeight(_config.plot.height)
+    _config.style.height = 'auto'
+    _config.style.minHeight = _config.plot.height
 
     this.setState({
       config: _config,
@@ -334,7 +336,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: this.wrap.offsetHeight - 30,
+      height: plot.height
     })
     
     chart.data(data)
@@ -443,7 +445,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: this.wrap.offsetHeight - 30,
+      height: plot.height,
       padding: [0, 0, 0, 0],
     })
     chart.data([_data])
@@ -627,7 +629,7 @@
           </div> : null
         }
         <NormalHeader config={config} />
-        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
+        <div className="canvas-wrap">
           {config.plot.download === 'enable' && this.state.chart ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null}
           <div className="canvas" id={this.state.chartId}></div>
         </div>

--
Gitblit v1.8.0