From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 八月 2021 17:17:11 +0800
Subject: [PATCH] 2021-08-26

---
 src/menu/components/chart/antv-pie/index.jsx |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx
index 593fcd5..7055125 100644
--- a/src/menu/components/chart/antv-pie/index.jsx
+++ b/src/menu/components/chart/antv-pie/index.jsx
@@ -223,10 +223,6 @@
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || 'y'
     let type = plot.type || 'type'
-    let height = plot.height || 400
-    if (card.plot.title || card.search.length > 0) {
-      height = height - 45
-    }
 
     const _data = this.getnestdata(X_axis, Y_axis, type)
     const dvx = new DataView().source(_data)
@@ -258,7 +254,7 @@
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height,
+      height: this.wrap.offsetHeight - 30,
       padding: 0,
     })
 
@@ -420,10 +416,6 @@
     let color = plot.color || 'rgba(0, 0, 0, 0.85)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || 'y'
-    let height = plot.height || 400
-    if (card.plot.title || card.search.length > 0) {
-      height = height - 45
-    }
 
     let data = this.getdata(X_axis, Y_axis)
 
@@ -433,7 +425,7 @@
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height
+      height: this.wrap.offsetHeight - 30
     })
 
     if (plot.shape !== 'nightingale' && plot.show !== 'value') {
@@ -651,7 +643,7 @@
   changeStyle = () => {
     const { card } = this.state
 
-    MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin'], card.style)
+    MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style)
   }
 
   getStyle = (comIds, style) => {
@@ -693,7 +685,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>
       </div>
     )
   }

--
Gitblit v1.8.0