king
2021-05-25 610916b0e897c4953310bac7c0a9a37c7379ffc0
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -86,7 +86,13 @@
      _sync = false
    }
    _config.style.height = config.plot.height || 400
    let height = config.plot.height || 400
    if (config.plot.title) {
      _config.plot.height = height - 75
    } else {
      _config.plot.height = height - 30
    }
    _config.style.height = height
    this.setState({
      config: _config,
@@ -311,7 +317,7 @@
    const chart = new Chart({
      container: chartId,
      autoFit: true,
      height: plot.height ? (plot.height - 80) : 320,
      height: plot.height,
      padding: [0, 0, 0, 0],
    })
    chart.data([_data]);
@@ -457,7 +463,7 @@
        }
        <NormalHeader config={config} />
        <div className="canvas-wrap">
          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div>
        </div>
      </div>
    )