Here is the standard setting code from the help files. If that doesn't help
you, then indicate exactly what type of error you are getting:
Sub FormatTimeScaling()
Dim chConstants
Dim axCategory
Set chConstants = ChartSpace1.Constants
' Change the chart to a Line chart.
ChartSpace1.Charts(0).Type = chConstants.chChartTypeLine
' Set a variable to the category axis.
Set axCategory =
ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
' Specify that you will determine the grouping settings of the
' axis. Note that this line of code is necessary only if the
' GroupingType property for the axis has been previously set to
' chAxisGroupingNone.
axCategory.GroupingType = chConstants.chAxisGroupingManual
' Group the category axis by month.
axCategory.GroupingUnitType = chConstants.chAxisUnitMonth
' Create a new grouping for every month.
axCategory.GroupingUnit = 1
' Display the average of the items in each group.
axCategory.GroupingTotalFunction = chConstants.chFunctionAvg
' A tick label is displayed for every month.
axCategory.TickLabelUnitType = chConstants.chAxisUnitMonth
' A tick mark is displayed for every three months.
axCategory.TickMarkUnitType = chConstants.chAxisUnitQuarter
End Sub
--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at
www.lulu.com/owc