king
2021-11-18 c98e45bfac25e9110ad0383faac54a54d98ea9d5
src/menu/components/chart/antv-dashboard/index.jsx
@@ -234,7 +234,7 @@
    const chart = new Chart({
      container: card.uuid + 'dashboard',
      autoFit: true,
      height: plot.title ? plot.height - 45 : plot.height,
      height: this.wrap.offsetHeight - 30,
    })
    
    chart.data(data)
@@ -333,7 +333,7 @@
    const chart = new Chart({
      container: card.uuid + 'dashboard',
      autoFit: true,
      height: plot.title ? plot.height - 45 : plot.height,
      height: this.wrap.offsetHeight - 30,
      padding: [0, 0, 0, 0],
    })
    chart.data(data)
@@ -466,7 +466,7 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style)) || !is(fromJS(component.search), fromJS(card.search))) {
      let _element = document.getElementById(card.uuid + 'dashboard')
      if (_element) {
        _element.innerHTML = ''
@@ -528,8 +528,8 @@
        } trigger="hover">
          <Icon type="tool" />
        </Popover>
        {card.plot.title ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
        <div className="canvas" id={card.uuid + 'dashboard'}></div>
        <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/>
        <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div>
      </div>
    )
  }