Surface 3D Series and datetime x Axis

TeeChart for ActiveX, COM and ASP
Post Reply
miked
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am

Surface 3D Series and datetime x Axis

Post by miked » Thu Feb 05, 2004 2:25 am

I am having difficulties getting any 3d surface or tower series to correctly display when passing the x value as a datetime .

I replicated it in the VB ActivesX (Surface 3D) sample by modifing the first sub as such:


Private Sub FillSurface()
' fill surface with sample values...
TChart1.Series(0).Clear


TChart1.Axis.Bottom.Labels.DateTimeFormat = "h:nn:ssampm m/d/yyyy"
TChart1.Axis.Bottom.Labels.MultiLine = True

With TChart1.Series(0).asSurface
' remove all surface points...
' set initial surface size ( rows x columns )
'.NumXValues = HScroll1.Value
'.NumZValues = HScroll1.Value

vHours = 48
vMinutes = 60
vDateTime = Now

' add surface points with a loop...
For X = 1 To vHours
For Z = 1 To vMinutes
' add a surface point with a formula...
.AddXYZ CDate(vDateTime), 0.5 * Cos(X / (.NumXValues * 0.2)) + Cos(Z / (.NumZValues * 0.2)), Z, "", clTeeColor
Next Z
vDateTime = DateAdd("h", 1, vDateTime)
Next X
End With
End Sub


Am I missing something? Is there a work around?

Regards,

Mike

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Feb 05, 2004 6:11 pm

Hi Mike,

you should add the following three lines on top of the Sub :

Code: Select all

TChart1.Series(0).asSurface.IrregularGrid = True
TChart1.Series(0).XValues.DateTime = True
TChart1.Axis.Bottom.Labels.Size = 20

miked
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am

Post by miked » Wed Feb 11, 2004 4:28 am

Works good now , thanks!

Post Reply