Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 Michael Hudston wrote: 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 -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cheers Andy, I am considering different graph types at this time.
"Andy Pope" wrote: 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 Michael Hudston wrote: 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 -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changed data lables in graph from 0% to blank or N/A | Excel Discussion (Misc queries) | |||
Change Chart Data Lables size | Charts and Charting in Excel | |||
graph, data lables value, dont show zero values | Charts and Charting in Excel | |||
Data Lables, in chart go away when reopening | Charts and Charting in Excel | |||
Data Lables, series and Scatterplots | Charts and Charting in Excel |