king
2021-05-25 610916b0e897c4953310bac7c0a9a37c7379ffc0
src/menu/components/chart/antv-scatter/index.jsx
@@ -139,7 +139,8 @@
        _element.innerHTML = ''
      }
      setTimeout(this.ponitrender, 100)
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(this.ponitrender, 100)
    }
  }
@@ -188,7 +189,7 @@
    const chart = new Chart({
      container: card.uuid + 'canvas',
      autoFit: true,
      height: plot.height - 80
      height: plot.height - 70
    })
    chart.data(data);
@@ -233,13 +234,16 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
      refresh = true
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.ponitrender()
      }, 150)
    }
    component.width = component.plot.width
@@ -247,12 +251,6 @@
    
    this.setState({
      card: component
    }, () => {
      if (refresh) {
        setTimeout(() => {
          this.ponitrender()
        }, 100)
      }
    })
    this.props.updateConfig(component)
  }