echarts 之仪表盘
主要记录了仪表盘相关配置
let el = this.$refs.echartsEl;
let myChart = el && echarts.init(el);
let info = {
name: '平均分', prop:'averageGrade', color: '47, 219, 163',value:9}
let option = {
grid:{
//设置位置
left:0,
top:0,
right:0,
bottom:0
},
series: [
{
name: info.name,
type: 'gauge', //设置类型仪表盘
min: 0,
max: info.max,
splitNumber: 11,
radius: '86%', //半径
axisLine: {
// 轴线相关配置
lineStyle: {
// 轴线样式
color: [
[0.2, `rgb(${
info.color})`],
[1, `rgb(${
info.color})`]
]