react 中echarts-for-react使用 自适应div

import * as React from 'react'
import ReactEcharts from 'echarts-for-react'

export interface IProps {

}
interface IState {
   
}

class CapitalBudget extends React.Component<IProps, IState> {
  
    constructor(props: IProps) {
        super(props)
       
    }

    getOption () {
        return {
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                axisLabel: {
                    formatter: '{value} 年'
                },
                axisTick: {
                    alignWithLabel: true
                },
                data: ['2012', '2013', '2014', '2015', '2016', '2017', '2018']
            },
            yAxis: {
                type: 'value',
                axisLabel: {
                    formatter: '{value} 万'
                },
            },
            series: [{
                data: [820, 932, 901, 934, 1290, 1330, 1320],
                type: 'line'
            }]
        }
    }
    render() {
    
        return (
           
            <React.Fragment>  
                <ReactEcharts
                    option={this.getOption()}
                    
                    100%', height: '238px'}}
                />
            </React.Fragment> 
        )
    }
}

export default CapitalBudget