+ Reply to Thread
Results 1 to 2 of 2

Need help with series chart, please

Hybrid View

  1. #1
    Registered User
    Join Date
    05-11-2005
    Posts
    12

    Need help with series chart, please

    Here is my code:

    Charts.Add
    ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Crib " & cribNum & " Graph"
    With ActiveChart
    .SetSourceData Range("VertTop:VertBot,LRLatTop:LRLatBot,HRLatTop:HRLatBot"), PlotBy:=xlColumns
    .ChartType = xlXYScatter
    .SeriesCollection(1).Name = "=""Weight"""
    .SeriesCollection(1).XValues = Range("AxleTop:AxleBot")
    .SeriesCollection(2).Name = "=""Low Rail"""
    .SeriesCollection(2).XValues = Range("AxleTop:AxleBot")
    .SeriesCollection(3).Name = "=""High Rail"""
    .SeriesCollection(3).XValues = Range("AxleTop:AxleBot")
    .HasTitle = True
    .ChartTitle.Characters.text = "Crib " & cribNum & " - " & thisFileName & " Lateral Forces - Leading and Trailing Axles"
    .Axes(xlCategory, xlPrimary).HasTitle = True
    .Axes(xlCategory, xlPrimary).AxisTitle.Characters.text = "Axle #"
    .Axes(xlValue, xlPrimary).HasTitle = True
    .Axes(xlValue, xlPrimary).AxisTitle.Characters.text = _
    "Lateral Forces (kips)"
    .SeriesCollection(1).AxisGroup = 2
    .Axes(xlValue, xlSecondary).HasTitle = True
    .Axes(xlValue, xlSecondary).AxisTitle.Characters.text = "Weight (kipps)"
    .Axes(xlValue, xlSecondary).MinimumScale = -140
    .Axes(xlValue, xlSecondary).MaximumScale = 40
    .HasLegend = True
    .Legend.Position = xlBottom
    .PlotArea.Interior.ColorIndex = xlNone

    now this all works, but it puts the series collection weight as high rail, and high rail as weight. I try switching the order that I entered the three sourceData entries, but it doesnt make a difference. How do I fix this so the data corresponds to the appriopriate collection.
    Thanks

  2. #2
    Registered User
    Join Date
    05-11-2005
    Posts
    12
    anyone have any ideas to this

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1