饼图外显示百分比,labelLine控制与环的距离

示例:

image.png
function lossTenants(){
    var myDailyEn = echarts.init(document.getElementById('lossTenants'));
    option = {
        tooltip: {
            backgroundColor: '#fff',
            textStyle:{
                color:'#545EFF'
            },
            formatter: "{b}:
{c} ({d}%)" }, legend: { show:false }, color: ['#15D3FF','#FFE418','#FB497C','#47DDE8','#656EFB'], series: [ { name:'', type:'pie', radius: ['54%', '70%'], label: { formatter: '{d}%' }, labelLine:{ show:false, length:8, length2:8 }, data:[ {value:25, name:'物业服务差'}, {value:5, name:'环境差'}, {value:30, name:'生意不好'}, {value:20, name:'租金高'}, {value:20, name:'其他'} ] } ] }; myDailyEn.setOption(option); }

你可能感兴趣的:(饼图外显示百分比,labelLine控制与环的距离)