| | |
| | | _element.innerHTML = '' |
| | | } |
| | | |
| | | setTimeout(this.pierender, 100) |
| | | this.$timer && clearTimeout(this.$timer) |
| | | this.$timer = setTimeout(this.pierender, 100) |
| | | } |
| | | } |
| | | |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: card.plot.height ? (card.plot.height - 80) : 320 |
| | | height: card.plot.height ? (card.plot.height - 75) : 325 |
| | | }) |
| | | |
| | | if (plot.shape !== 'nightingale' && plot.show !== 'value') { |
| | |
| | | |
| | | 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.pierender() |
| | | }, 150) |
| | | } |
| | | |
| | | component.width = component.plot.width |
| | |
| | | |
| | | this.setState({ |
| | | card: component |
| | | }, () => { |
| | | if (refresh) { |
| | | setTimeout(() => { |
| | | this.pierender() |
| | | }, 100) |
| | | } |
| | | }) |
| | | this.props.updateConfig(component) |
| | | } |