From 610916b0e897c4953310bac7c0a9a37c7379ffc0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 25 五月 2021 16:29:13 +0800 Subject: [PATCH] 2021-05-25 --- src/tabviews/custom/components/chart/antv-scatter/index.jsx | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index 5989af5..0e2135d 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -52,13 +52,14 @@ _sync = false } + let height = config.plot.height || 400 if (config.plot.title || config.search.length > 0) { - _config.plot.height = _config.plot.height - 80 + _config.plot.height = height - 70 } else { - _config.plot.height = _config.plot.height - 30 + _config.plot.height = height - 25 } - _config.style.height = config.plot.height + _config.style.height = height this.setState({ config: _config, @@ -324,7 +325,7 @@ } /** - * @description 鎶樼嚎鍥炬覆鏌� + * @description 鏁g偣鍥炬覆鏌� */ scatterrender = () => { const { plot, data, chartId } = this.state @@ -416,7 +417,7 @@ } })} </div> - <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> + <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div> </div> {empty ? <Empty description={false}/> : null} </div> -- Gitblit v1.8.0