Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO ADD LEGENDS IN CHART S. LALLY Excel Discussion (Misc queries) 1 April 9th 10 01:46 AM
Dynamic chart legends anton Charts and Charting in Excel 1 September 5th 08 02:03 PM
Chart Legends Tina Charts and Charting in Excel 1 March 20th 07 07:22 PM
formatting chart legends Dean1234567890 Charts and Charting in Excel 1 September 4th 06 07:15 PM
bar chart with multiple legends? Lizzi Charts and Charting in Excel 2 January 19th 05 08:01 PM


All times are GMT +1. The time now is 08:02 PM.

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

About Us

"It's about Microsoft Excel"