I have a number of pie charts that need to be automated in their production and I have a problem of some of them have overlapping labels (They need to be outside each slice).
Where this is the case I am converting them to a Bar of Pie which effectively solves the problem and is accepted as the only automated solution available by my client.
My problem is how do I detect if there is an overlap of any labels? Rather than having to manual check each output that contains a pie chart (there are several) I want to utilise code to detect this and to automatically change the pie to a bar of pie.
I have seen some code that in all honesty I don't quite understand but it seems to only deal with multi series line charts - Excel macro to fix overlapping data labels in line chart - Stack Overflow. Rather than moving the label as per the code in the attached link, I would simply change the pie to a bar of pie.
Having tested this on one pie chart in my file it doesn't work but I don't know how to amend to make it work for a pie chart so if anyone has some experience with this or could interpret the code to allow me to amend it would be greatly appreciated.
I don't have any other options available to fix this so removing labels less than x%, etc isn't possible and also I don't want to have to add controls/code to look at the the many sheets to deal with the many more pie chart due to the time it would take to modify the code for each chart.
TIA
Where this is the case I am converting them to a Bar of Pie which effectively solves the problem and is accepted as the only automated solution available by my client.
My problem is how do I detect if there is an overlap of any labels? Rather than having to manual check each output that contains a pie chart (there are several) I want to utilise code to detect this and to automatically change the pie to a bar of pie.
I have seen some code that in all honesty I don't quite understand but it seems to only deal with multi series line charts - Excel macro to fix overlapping data labels in line chart - Stack Overflow. Rather than moving the label as per the code in the attached link, I would simply change the pie to a bar of pie.
Having tested this on one pie chart in my file it doesn't work but I don't know how to amend to make it work for a pie chart so if anyone has some experience with this or could interpret the code to allow me to amend it would be greatly appreciated.
I don't have any other options available to fix this so removing labels less than x%, etc isn't possible and also I don't want to have to add controls/code to look at the the many sheets to deal with the many more pie chart due to the time it would take to modify the code for each chart.
TIA