Hello, Greetings. I'm new to Apex charts and have been able to do most of my tasks with the documentation you have provided. Thank you very much !! However, I have an issue with the total not showing up in the donut chart. I assumed that if I set the total - show to "true", the total will be shown in the middle of the chart. I use these options for creating the chart. I get the values from server as json then update the chart using updateoption. Please advise me as to why the total is not showing up.
var donutoptions = {
chart: {
width: '100%',
height: '100%',
type: 'donut',
id: '',
},
plotOptions: {
pie: {
donut: {
total: {
show: true,
label: 'Total',
color: '#373d3f',
}
}
}
},
title: {
text: '',
align: 'center',
margin: 15,
offsetX: 0,
offsetY: 0,
floating: false,
style: {
fontSize: '12px',
color: 'grey'
}
},
labels: [""],
dataLabels: {
enabled: false
},
series: [0],
legend:
{
offsetY: -10,
float:true,
position: 'bottom',
style: {
fontSize: '10px'
}
},
responsive: [{
breakpoint: 250,
options: {
chart: {
width: 200
},
legend: {
position: 'right'
}
}
}]
};
The total should be given within labels.
plotOptions: {
pie: {
donut: {
labels: {
show: true,
name: {
show: false
},
value: {
offsetY: -1,
show: true
},
total: {
show: true
}
}
}
}
},
I'm closing this issue now.
Most helpful comment
The total should be given within labels.
plotOptions: {
pie: {
donut: {
I'm closing this issue now.