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()} style={{ '100%', height: '238px'}} /> </React.Fragment> ) } } export default CapitalBudget
react 中echarts-for-react使用 自适应div
免责声明:文章转载自《react 中echarts-for-react使用 自适应div》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇VMP加壳(二):VMP的虚拟化原理ubuntu用命令连接无线网络下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=