Pie Chart Labels Overlapping

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,564
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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

mole999

Well-known Member
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
have a search for Peltier on the web, do loads of chart stuff could be an answer there
 
Upvote 0

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,564
Office Version
  1. 365
Platform
  1. Windows
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,191,516
Messages
5,987,034
Members
440,074
Latest member
Emmanuelian

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
Top