//源代码
let option = {
title: {
text: '单位:吨',
right: 'right',
textStyle: {
fontSize: '14',
fontWeight: 'normal'
}
},
tooltip: {
trigger: 'item',
formatter: '{b} : {c}(吨)',
},
legend: {
bottom: '5%',
left: 'center'
},
series: [
{
type: 'pie',
radius: ['40%', '70%'],
//avoidLabelOverlap: false,//会导致线条重叠,删除
//label: {
//show: true,
//position: 'center'
//}, 发现是label的影响到线条消失,删除即可
emphasis: {
label: {
show: false,
fontSize: '40',
fontWeight: 'bold'
}
},
itemStyle:{
normal: {
color: function (params) {
var colorList = ['#ffc300','#ffeb3b', '#dea478','#ff8d1a','#d2ca3a','#fad55f']
return colorList[params.dataIndex]
}
}
},
data: [
{
value: 111, name: '粮食'},
{
value: 222, name: '糖料'},
{
value: 333, name: '蔬菜'},
{
value: 444, name: '水果'},
{
value: 555, name: '水产品'},
{
value: 666, name: '肉类产量'}
]
}
]
};
echarts 环形饼图 labelLine 线条消失
猜你喜欢
转载自blog.csdn.net/weixin_45108907/article/details/113743208
今日推荐
周排行