Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting the colour of the legends in chart.
Hi Friends
I create a Line - Column on 2 Axes chart in Excel and I want to change the colour of the Legends. Can anyone help me with that??? Here is the code for the Chart creation..... Regards Senthil Sub ExcelChart() ActiveWorkbook.Charts.Add ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:J13"), PlotBy:= _ xlRows ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _ "Line - Column on 2 Axes" ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "AME Gear" .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Count" .Axes(xlCategory, xlSecondary).HasTitle = False .Axes(xlValue, xlSecondary).HasTitle = True .Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = "Percent" End With With ActiveChart.Parent .Top = 170 .Left = 10 .Height = 350 .Width = 600 End With ActiveChart.HasLegend = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW TO ADD LEGENDS IN CHART | Excel Discussion (Misc queries) | |||
Dynamic chart legends | Charts and Charting in Excel | |||
Chart Legends | Charts and Charting in Excel | |||
formatting chart legends | Charts and Charting in Excel | |||
bar chart with multiple legends? | Charts and Charting in Excel |