| | |
| | | } |
| | | } |
| | | |
| | | _config.style.height = config.plot.height || 400 |
| | | _config.plot.height = Utils.getHeight(_config.plot.height) |
| | | _config.style.height = 'auto' |
| | | _config.style.minHeight = _config.plot.height |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: this.wrap.offsetHeight - 30, |
| | | height: plot.height |
| | | }) |
| | | |
| | | chart.data(data) |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: this.wrap.offsetHeight - 30, |
| | | height: plot.height, |
| | | padding: [0, 0, 0, 0], |
| | | }) |
| | | chart.data([_data]) |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} /> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className="canvas-wrap"> |
| | | {config.plot.download === 'enable' && this.state.chart ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} |
| | | <div className="canvas" id={this.state.chartId}></div> |
| | | </div> |