uniapp中的echarts绘制的图表如何修改样式?
logstatrtone() {
this.optionone = {
backgroundColor: '#0c1e55',
color: ['#00a0fc', '#ffe400', '#ff9a09', '#ef1e5f', '#23cbe5', '#ec561b', '#ffa500', '#dddf00',
'#b23aee', '#50b332'
],
tooltip: {
// trigger: 'item',
// formatter: " {a}
{b} : {c} ({d}%)"
formatter: " 检查数量:{c}"
},
legend: { // 图例-图上面的分类
// orient: 'vertical',
// right: 30,
// icon: 'rect',//长方形
icon: 'circle',
top: "1%",
itemWidth: 10,
itemHeight: 10,
// itemGap: 13,
// data: ['安全监管', '河涌保洁', '河水办突击检查', '排水单元技术服务', '农村生活污水', '排水单位技术服务', '排水单位监管', '水利设施考核',
// '证后监管'],
data:this.range,
// right: '56%',
textStyle: {
fontSize: 15,
color: '#a6cde8',
lineHeight: 49,
},
formatter: function(name) {
return "" + name + ""
},
padding: [2, 2]
},
grid: {
top: '20%',
left: '53%',
right: '10%',
bottom: '6%',
containLabel: true
},
series: [{
label: {
normal: {
// formatter: '{b|{b}:} {c} \n ',
rich: {}
},
emphasis: {
show: true,
}
},
// labelLine: {
// normal: {
// show: false
// }
// },
name: '访问来源',
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
data:this.range,
// data: [{
// value: 9,
// name: '安全监管'
// },
// {
// value: 7,
// name: '河涌保洁'
// },
// {
// value: 9,
// name: '河水办突击检查'
// },
// {
// value: 7,
// name: '农村生活污水'
// },
// {
// value: 8,
// name: '排水单元技术服务'
// },
// {
// value: 2,
// name: '排水单位监管'
// },
// {
// value: 3,
// name: '水利设施考核'
// },
// {
// value: 3,
// name: '证后监管'
// },
// ],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
labelLine: {
normal: {
length: 15,
length2: 2,
// smooth: true,
}
},
}]
};
},