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-pie/index.jsx | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index e08e450..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') { @@ -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