Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 30
Default reverse axis not working as before...

This code "worked" in 2003, but doesn't "work" in 2007...

In this context, "worked" means that in 2003, the X axis for both Y axes
were reversed, as requested. In 2007, only the X axis for the primary Y
axis is reversed, with the X axis for the secondary Y axis remains the
same (but the labels are reversed, so the graph looks odd and is hard/
impossible to interpret properly).

Also, the line marked with <<<<'s throws an error in 2007 but worked in
2003. Any ideas how to fix it?

Thanks!
Bruce


Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SetSourceData Source:=Sheets(mainsheet$).Range("E:G"),
PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="tempsal"
ActiveChart.SeriesCollection(2).Select
ActiveChart.SeriesCollection(2).AxisGroup = 2
ActiveChart.PlotArea.Select
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = cruiseid$
.ChartTitle.AutoScaleFont = False
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Distance
(km)"
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
ActiveChart.HasLegend = False
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
.MinimumScale = 0
.MaximumScale = 350
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = True
' .ScaleType = xlLinear <<<<<<<<<<<<<<<<<<<<<
End With
ActiveChart.SeriesCollection(2).AxisGroup = 1
ActiveChart.SeriesCollection(1).AxisGroup = 2
With ActiveChart
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Salinity
(ppt)"
.Axes(xlValue, xlSecondary).HasTitle = True
.Axes(xlValue, xlSecondary).AxisTitle.Characters.Text =
"Temperature (degrees c)"
End With
For i = 1 To 2
ActiveChart.SeriesCollection(i).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
Next i
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
Reverse y-axis, with maximum number at x-axis Elise Charts and Charting in Excel 1 February 10th 10 02:41 PM
Secondary X-axis with reverse Y-axis hamond Charts and Charting in Excel 6 September 20th 06 06:04 PM
How Do I reverse axis in a spreadsheet ChrisH Excel Worksheet Functions 3 July 11th 05 07:03 AM
Reverse values but not X axis Nadia Charts and Charting in Excel 2 June 22nd 05 07:47 AM
scatterplot chart with reverse axis hls0005 Charts and Charting in Excel 4 December 18th 04 09:03 PM


All times are GMT +1. The time now is 05:01 AM.

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"