king
2021-01-06 b6ccd63b80fc7017bfabc446787732a98c7cbab7
src/menu/components/chart/antv-bar/index.jsx
@@ -126,7 +126,7 @@
    const { card } = this.state
    if (parentId === card.parentId) {
      let _element = document.getElementById(card.uuid)
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
@@ -209,7 +209,7 @@
      }
      const chart = new Chart({
        container: card.uuid,
        container: card.uuid + 'canvas',
        autoFit: true,
        height: plot.height || 400
      })
@@ -408,7 +408,7 @@
    })
    const chart = new Chart({
      container: card.uuid,
      container: card.uuid + 'canvas',
      autoFit: true,
      height: plot.height || 400
    })
@@ -571,7 +571,7 @@
      }
      const chart = new Chart({
        container: card.uuid,
        container: card.uuid + 'canvas',
        autoFit: true,
        height: plot.height || 400
      })
@@ -734,7 +734,7 @@
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot))) {
      let _element = document.getElementById(card.uuid)
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
@@ -852,11 +852,18 @@
    }
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
  }
  render() {
    const { card } = this.state
    return (
      <div className="menu-line-chart-edit-box" style={{...card.style, height: card.plot.height || 400}}>
      <div className="menu-line-chart-edit-box" style={{...card.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">
@@ -878,7 +885,7 @@
          config={card}
          updateaction={this.updateComponent}
        />
        <div className="canvas" id={card.uuid}></div>
        <div className="canvas" id={card.uuid + 'canvas'}></div>
      </div>
    )
  }