TimeScale Axis problem

J

Joe

Hello Everyone,

I am having trouble setting the tick marks for a time (X) axis:
For some reason when I try to set the "GroupingType" property to
"chAxisGroupingManual" it generates a "Run-time Error" - Invalid
Parameter

(even though the "GroupingType" has been initially set to
"chAxisGroupingNone"
and I don't know what else to set in order to allow me change this
value.

Thanks

'======================================================
With ChartSpace1
.CLEAR
.ConnectionString = gDBString
.CommandText = strSQL
End With

Set myChart = ChartSpace1.Charts.ADD

With myChart
.Type = chChartTypeSmoothLineStacked
.HasAutoChartDepth = True
.HasLegend = True
.HasAutoAspectRatio = True
.SetData chDimCategories, chDataBound, myCategory
.SetData chDimValues, chDataBound, myTrendValues
End With

With myChart.Axes(chAxisPositionTimescale) ' Category (X) axis.
.HasTitle = True
.HasMajorGridlines = True
.HasMinorGridlines = True
.Title.Caption = "Time"
.Title.Font.Name = "Arial Narrow"
.Title.Font.SIZE = 9
.Scaling.Type = chScaleTypeLinear
.Scaling.Orientation = chScaleOrientationMinMax
.MajorUnit = 1
.MinorUnit = intTickMark ' value set based on period chosen
.GroupingType = chAxisGroupingManual
.GroupingUnitType = chAxisUnitDay ' for now it will be set to
this
End With

'======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top