No Data Lables

M

Michael Hudston

Can anyone tellme why the Datalables wont appear on the chart? Despite me
putting True for Percentage and Category?



Range("H2").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xl3DPieExploded
ActiveChart.SetSourceData Source:=Sheets("CHART
DATA").Range("C3:C51")
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "='CHART
DATA'!$B$3:$B$51"
ActiveChart.SeriesCollection(1).Values = "='CHART
DATA'!$C$3:$C$51"
ActiveChart.SeriesCollection(1).XValues = "='CHART
DATA'!$B$3:$B$51"

ActiveChart.Parent.Top = Range("H2").Top
ActiveChart.Parent.Left = Range("H2").Left
ActiveChart.Parent.Width = Range("H2:S26").Width
ActiveChart.Parent.Height = Range("H2:S26").Height

ActiveChart.ChartTitle.Select
ActiveChart.ChartTitle.Text = "LRU By Percentage of
Distribution"

ActiveChart.SeriesCollection.ApplyDataLabels
ActiveChart.SeriesCollection.DataLabels.Select
Selection.ShowPercentage = True
Selection.ShowCategoryName = True

ActiveChart.Legend.Select
Selection.Delete
 
A

Andy Pope

Hi,

You need to apply the data labels to a specific series.

ActiveChart.SeriesCollection(1).ApplyDataLabels

But I would change the chart type if I was you. Trying to read 51 slices
in a pie will be impossible. And the data labels will overlap for sure.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top