From 73a5124745890650d0fc91234bdbaa66d9bcbc6a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 09 六月 2021 17:52:01 +0800 Subject: [PATCH] 2021-06-09 --- src/menu/components/chart/antv-pie/index.jsx | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index 343f9ae..cfbbd96 100644 --- a/src/menu/components/chart/antv-pie/index.jsx +++ b/src/menu/components/chart/antv-pie/index.jsx @@ -210,6 +210,10 @@ 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) @@ -241,7 +245,7 @@ const chart = new Chart({ container: card.uuid + 'canvas', autoFit: true, - height: card.plot.height ? (card.plot.height - 75) : 325, + height: height, padding: 0, }) @@ -419,6 +423,10 @@ 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) @@ -428,7 +436,7 @@ const chart = new Chart({ container: card.uuid + 'canvas', autoFit: true, - height: card.plot.height ? (card.plot.height - 75) : 325 + height: height }) if (plot.shape !== 'nightingale' && plot.show !== 'value') { @@ -683,7 +691,6 @@ return ( <div className="menu-pie-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}> - <NormalHeader config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> {!ismob ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null} @@ -699,6 +706,7 @@ } trigger="hover"> <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> ) -- Gitblit v1.8.0