echarts 饼状图 label 的position为inside时怎么调整位置

    series: [
        {
            animation: true,
            name: '访问来源',
            type: 'pie',
            radius: ['49%', '80%'],
            startAngle: 270,
            avoidLabelOverlap: false,
            hoverAnimation: false,
            itemStyle: {
                normal: {
                    borderWidth: 1,
                    borderColor: '#fff',
                }
            },
            label: {
                show: true,
                fontSize: 14,
                position: 'inside',
            },
            labelLine: {
                show: false
            },
            data
        },
        {
            animation: false,
            name: '11',
            type: 'pie',
            radius: [0, '45.6%'],
            tooltip: { show: false },
            hoverAnimation: false,
            label: {
                position: 'center',
                formatter: function (params) {
                    //  return `{a|中间的字\n自行替换}\n{b|${datas.power}}\n{c|这是单位}\n{icon|}{d|${datas.per}%}\n{box|}`
                    return center_value + '\nMW'
                },
                textStyle: {
                    fontWeight: 'bold',
                    fontSize: 16,
                    color: '#00529E'
                }
            },
            itemStyle: {
                normal: {
                    color: "#80E0F9"
                }
            },
            data: [{
                value: 1,
            },]
        },
    ]
阅读 4.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题