label: {
normal: {
show: true,
borderRadius:'5',
position: 'inside',
rotate:'tangential',
textStyle: {
fontSize: '40',
}
},
},
刚才试了一下,我这是起作用的,带这个属性文本标签是斜的,不带 总是正的,
https://echarts.baidu.com/examples/editor.html?c=pie-doughnut这个里面 你加上和删除那个属性看一下效果就比较清楚了
https://echarts.baidu.com/examples/editor.html?c=pie-doughnut
我在echarts官网上的事例里面使用没有问题哦
app.title = '环形图';
option = {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
legend: {
orient: 'vertical',
x: 'left',
data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
},
series: [
{
name:'访问来源',
type:'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'inside',
rotate:'tangential'
},
emphasis: {
show: true,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{value:335, name:'直接访问'},
{value:310, name:'邮件营销'},
{value:234, name:'联盟广告'},
{value:135, name:'视频广告'},
{value:1548, name:'搜索引擎'}
]
}
]
};
你使用的是vue-echarts吗
fontSize: '40',逗号去掉试试