Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Smoothing a chart line using VBA

I have a macro that creates a Line Column on 2 Axes Chart and holds 3 sets of
data, the first 2 represented by columns, the third by a line. I have been
unsuccessfully trying to get the line to smooth between data points.

I have tried code such as:

With ActiveChart.LineGroups(1)
.Smooth = True
End With

Which gives me the error: "Object doesn't support this property or method"

or:

Dim Ser As Series
Set Ser = Charts("Attendance Roster Chart").SeriesCollection("Attendance
Pivot")
With Ser
.Smooth = True
.Border.Weight = xlThick
End With

(The chart name sheet is "Attendance Roster Chart", and the series is
"Attendance Pivot")

Which gives me the error message "Unable to get the SeriesCollection
property of the chart class"

I'm getting frustrated. Any ideas?

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Smoothing a chart line using VBA

Just to clarify, are you tring to do a polynomial regression of your source
data or to add a trend line, or to create a moving average, or just to change
the chart type to smooth line? Other than changing the chart type you have to
select a smoothing algrythm. I recommend looking at the trend function. I
have used it with quite a bit of success. If it is just a chart type issue
then just recording a macro of changing the chart type and analyzing what is
recorded should cover things.
--
HTH...

Jim Thomlinson


"lewscannon" wrote:

I have a macro that creates a Line Column on 2 Axes Chart and holds 3 sets of
data, the first 2 represented by columns, the third by a line. I have been
unsuccessfully trying to get the line to smooth between data points.

I have tried code such as:

With ActiveChart.LineGroups(1)
.Smooth = True
End With

Which gives me the error: "Object doesn't support this property or method"

or:

Dim Ser As Series
Set Ser = Charts("Attendance Roster Chart").SeriesCollection("Attendance
Pivot")
With Ser
.Smooth = True
.Border.Weight = xlThick
End With

(The chart name sheet is "Attendance Roster Chart", and the series is
"Attendance Pivot")

Which gives me the error message "Unable to get the SeriesCollection
property of the chart class"

I'm getting frustrated. Any ideas?

Thanks in advance

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
Excel 2007 Line Chart - Chart line to go directly to next value TyreDude Charts and Charting in Excel 3 October 12th 11 12:52 PM
How do I convert a line chart to a vertical line chart in Excel Gerty Charts and Charting in Excel 1 August 20th 09 04:28 PM
Smoothing Line Graphs - Excel 2000 A. Preine - Texas GLO Coastal Resources Excel Discussion (Misc queries) 3 December 5th 06 07:16 PM
smoothing data Michael Vestel Excel Discussion (Misc queries) 1 November 18th 06 03:30 AM
graph smoothing maksud Charts and Charting in Excel 4 August 10th 05 11:34 PM


All times are GMT +1. The time now is 12:28 AM.

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

About Us

"It's about Microsoft Excel"