ICustom3DSeries.AddArrayXYZ
ICustom3DSeries
procedure AddArrayXYZ(XArray, YArray, ZArray: OleVariant);
Type Library
TeeChartx
Description
The AddArrayXYZ method adds arrays of new points to a 3D Series.
Example [Visual Basic]
Private Sub Form_Load()
Dim ZArray() As Double
Dim YArray() As Double
Dim XArray() As Double
Dim CountVal As Integer
Dim HalfPi As Double
TeeCommander1.Chart = TChart1
With TChart1
.AddSeries scSurface
.Aspect.Orthogonal = False
.Legend.Visible = False
.Aspect.Chart3DPercent = 100
.Aspect.Zoom = 80
End With
ReDim ZArray(14000)
ReDim YArray(14000)
ReDim XArray(14000)
CountVal = 0
HalfPi = 3.142 / 2
For i = 0 To 199
For j = 0 To 69
XArray(CountVal + j) = i
ZArray(CountVal + j) = j
YArray(CountVal + j) = Cos(Abs((XArray(CountVal + j) / 20) - HalfPi)) _
* Sin(ZArray(CountVal + j) / 20)
Next j
CountVal = (i + 1) * 70
Next i
With TChart1.Series(0)
.asSurface.IrregularGrid = True
.asSurface.AddArrayXYZ XArray, YArray, ZArray
End With
End Sub