A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Label Doughnut-Chart outside



 
 
Thread Tools Display Modes
  #1  
Old February 1st, 2006, 08:58 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Label Doughnut-Chart outside


Hi,

Does anyone has a VBA Script to label a doughnut chart outside the
actual chart with a leader line? Excel only gives you this option with
a pie chart.

Thanx for any help.

Steeplechase


--
Steeplechase
------------------------------------------------------------------------
Steeplechase's Profile: http://www.excelforum.com/member.php...o&userid=31066
View this thread: http://www.excelforum.com/showthread...hreadid=507404

  #2  
Old February 1st, 2006, 10:59 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Label Doughnut-Chart outside

Hi,

If this is a single ring donut then you do not need any code.

Assuming your data is in A1:B5, labels in column A. Series name and
values in column B

A1:= B1:=Name
A2:=S1 B2:=1
A3:=S2 B3:=2
A4:=S3 B4:=3
A5:=S4 B5:=4

Add a copy of B1:B5 into C1:C5. Now select the range A1:C5 and create a
donut, which will have 2 rings.
Select the outer ring and change its chart type to Pie. The pie will
cover the donut for the moment until we finish formatting the chart.
Select the pie chart and add data labels make sure you check the leader
line option. On the patterns tab set the border and fill to none. This
will cause the pie to vanish but the data labels will remain.

With only 4 slices you will probably need to drag a data label away from
the donut in order to see the leader lines, but they are there now.

Cheers
Andy


Steeplechase wrote:
Hi,

Does anyone has a VBA Script to label a doughnut chart outside the
actual chart with a leader line? Excel only gives you this option with
a pie chart.

Thanx for any help.

Steeplechase



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3  
Old February 1st, 2006, 11:01 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Label Doughnut-Chart outside

It's easy to simulate the effect.

Create the doughnut chart.

Now, add the same data set as a 2nd series.

Select one of the plotted series. Select Chart | Chart Type... | Pie chart

Double-click the pie chart and add the desired labels.

Position the labels as desired.

Double-click the pie chart and from the Patterns tab set 'Border' and
'Area' to None. If you have a legend, delete the extraneous entry from
there.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

Hi,

Does anyone has a VBA Script to label a doughnut chart outside the
actual chart with a leader line? Excel only gives you this option with
a pie chart.

Thanx for any help.

Steeplechase


--
Steeplechase
------------------------------------------------------------------------
Steeplechase's Profile:
http://www.excelforum.com/member.php...o&userid=31066
View this thread: http://www.excelforum.com/showthread...hreadid=507404


  #4  
Old February 2nd, 2006, 08:00 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Label Doughnut-Chart outside


Hello There!
Thanx for your help. That actually works very well. Is there a way in
VBA to do those steps automatically? For example by just selecting a
graph and clicking on one single button?

I appreciate your help.

Steeplechase


--
Steeplechase
------------------------------------------------------------------------
Steeplechase's Profile: http://www.excelforum.com/member.php...o&userid=31066
View this thread: http://www.excelforum.com/showthread...hreadid=507404

  #5  
Old February 2nd, 2006, 10:20 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Label Doughnut-Chart outside

The simplest way to generate the code would be to make use of the macro
recorder. Just turn it on and perform the required steps in order to
format your chart.
For more information see Tushar's page,
http://tushar-mehta.com/excel/vba/be...rder/index.htm

Cheers
Andy

Steeplechase wrote:
Hello There!
Thanx for your help. That actually works very well. Is there a way in
VBA to do those steps automatically? For example by just selecting a
graph and clicking on one single button?

I appreciate your help.

Steeplechase



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Worksheet Functions 23 January 30th, 2006 07:16 PM
Text is missing along the vertical axis of the chart (Y label) BillAustralia Charts and Charting 1 January 10th, 2006 06:53 PM
Label an average line in a dynamic chart John Cordes Charts and Charting 3 June 17th, 2005 09:42 AM
Fan charts Dean Charts and Charting 7 May 30th, 2005 11:51 AM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM


All times are GMT +1. The time now is 01:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.