在React项目中使用echarts饼状图
一、安装
npm install echarts --save
二、引入
import echarts from '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'
三、使用
componentDidMount() {
//环形图百分比
var huan_val = document.getElementsByClassName("huan")[0]