echarts饼图的文字

想让文字默认就显示,给这个normal设置为true,让文字在圈的中间显示,position:inner,这个position的值也可以设置为center,left等等

var myChart = echarts.init(document.getElementById('main'));

		// 指定图表的配置项和数据
		myChart.setOption({
			tooltip: {
				trigger: 'item',
				formatter: "{b}: {c} ({d}%)"
			},
			color: ["#f7941d", "#e0483e", "#2bb0ee"],
			series: [{
				type: 'pie',
				radius: ['50%', '70%'],
				avoidLabelOverlap: false,
				label: {
					normal: {
						show: true,
					

猜你喜欢

转载自blog.csdn.net/u012720337/article/details/84938602