环状图,距离左边文字的距离
init_hot_matter_top5(){
console.log('---init_hot_matter_top5---');
let myChart = this.$echarts.init(document.getElementById('hot_matter_top5'));
var option;
option = {
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
orient: 'vertical',
left: 'left',
textStyle:{
fontSize: 16,//字体大小
color: '#ffffff'//字体颜色
},
},
color: ['#E61D79', '#4BD2EF', '#227176', '#FFFFFF', '#F5A721'],
series: [
{
name: '热门事项Top5',
type: 'pie',
radius: ['40%', '60%'],
avoidLabelOverlap: false,
left:'100',//**--------距离左边文字,100px**
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '18',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 1048, name: '社保业务' },
{ value: 735, name: '便民缴费' },
{ value: 580, name: '公积金业务' },
{ value: 484, name: '个税相关业务' },
{ value: 300, name: '交通违法' }
]
}
]
};
option && myChart.setOption(option);
},