Pie Chart Labels Overlapping

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,600
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
have a search for Peltier on the web, do loads of chart stuff could be an answer there
 
Upvote 0
Thanks Mole.

I've taken a look and after searching the website there doesn't seem to be anything that specifically deal with this although there is some very cool stuff on there and I will certainly be referring to it for other projects!
 
Upvote 0

Forum statistics

Threads
1,215,583
Messages
6,125,661
Members
449,247
Latest member
wingedshoes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top