React 实现 Echarts 可视化饼状图
**
一、 引入
**
import React, {
Component } from 'react'
import 'echarts/lib/echarts';
//导入饼图
import 'echarts/lib/chart/pie'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/title'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/markPoint'
import ReactEcharts from 'echarts-for-react'
//引入css样式
import styles from './Echarts.module.scss'
二、编写可视化
export default class EchartAge extends Component {
getEchartAge = ()=>{
let option = {
backgroundColor: 'rgba(2, 36, 150, 0.1)',
//图表标题
title: {
text: '年龄结构',
le