Echarts官方文档:
https://echarts.baidu.com/echarts2/doc/doc.html
一、导入第三方包
npm install native-echarts --save
二、导入Echarts组件
import Echarts from 'native-echarts
三、定义option
echartsOption.png
option = {
//设置图表边距
grid:{
left:0,
right:15,
top:15,
bottom:15,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
//图表展示样式切换按钮
toolbox: {
feature: {
dataView: {show: true, readOnly: false},