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-bar-line/index.jsx |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
index 6f036d7..151e4e6 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -108,7 +108,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
 
     let transfield = {}
     _config.columns.forEach(col => {
@@ -557,7 +559,9 @@
     if (_element) {
       _element.innerHTML = ''
     }
-    this.viewrender()
+    setTimeout(() => {
+      this.viewrender()
+    }, 100)
   }
 
   /**
@@ -903,7 +907,7 @@
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: this.wrap.offsetHeight - 25
+      height: plot.height
     })
 
     chart.data(_data)
@@ -1087,7 +1091,7 @@
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: this.wrap.offsetHeight - 25
+      height: plot.height
     })
     
     // 鍧愭爣杞存牸寮忓寲
@@ -1497,7 +1501,7 @@
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: this.wrap.offsetHeight - 25
+      height: plot.height
     })
 
     chart.data(_data)
@@ -1846,7 +1850,7 @@
           </div> : null
         }
         <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} />
-        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
+        <div className="canvas-wrap">
           {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null}
           <div className={'chart-action' + (config.plot.download === 'enable' ? ' downable' : '')}>
             {config.action.map(item => {

--
Gitblit v1.8.0