I want to display the sum of all data values in the centre of doughnut chart without using x and y-axis. For doughnut chart, I used this as reference https://echarts.apache.org/examples/zh/editor.html?c=pie-doughnut
As shown in below code, chartvalueData and nameoflabels both are coming dynamically.
this.chartData = {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
legend: {
orient: 'vertical',
x: 'left',
data: nameoflabels,
bottom: 20
}
series: [
{
name: 'Title',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
normal: {
textStyle: {
fontWeight: 'bold'
}
},
emphasis: {
textStyle: {
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: true
}
},
data: chartvalueData,
color: ['lightblue', 'orange','lightcoral','plum']
}
]
};