AddArrayGrid / SetMinMax Do Not Display Chart Where Desired
Posted: Fri Nov 19, 2004 4:03 pm
Josep,
I have used the snippet below you provided me in another post ("No axis min / max using AddArrayGrid or SetMinMax"). Thank you, very much.
Private Sub Form_Load()
Dim XZArray() As Double
Dim x As Integer, z As Integer
With TChart1
.Legend.Visible = False
.AddSeries scSurface
.Axis.Depth.Visible = True
' initialize dynamic array grid
ReDim XZArray(35)
' fill with random values
For x = 0 To 4
For z = 0 To 6
XZArray(x * 7 + z) = Rnd
Next z
Next x
' add to 3D series:
.Series(0).asSurface.AddArrayGrid 5, 7, XZArray
.Axis.Bottom.SetMinMax 1, 4
.Axis.Depth.SetMinMax 2, 4
End With
End Sub
That works, but try the SetMinMax with different parameters:
.Axis.Bottom.SetMinMax 10, 40
.Axis.Depth.SetMinMax 20, 40
OR
.Axis.Bottom.SetMinMax -1, 2
.Axis.Depth.SetMinMax -2, 0
The chart is not seen or only partially seen. This is indicative of the problem I'm seeing in my actual code. When using .asSurface.AddArrayGrid, how can I display the chart data within the max/min I want since AddArrayGrid's parameter list does not provide this infomation? Thanks!
I have used the snippet below you provided me in another post ("No axis min / max using AddArrayGrid or SetMinMax"). Thank you, very much.
Private Sub Form_Load()
Dim XZArray() As Double
Dim x As Integer, z As Integer
With TChart1
.Legend.Visible = False
.AddSeries scSurface
.Axis.Depth.Visible = True
' initialize dynamic array grid
ReDim XZArray(35)
' fill with random values
For x = 0 To 4
For z = 0 To 6
XZArray(x * 7 + z) = Rnd
Next z
Next x
' add to 3D series:
.Series(0).asSurface.AddArrayGrid 5, 7, XZArray
.Axis.Bottom.SetMinMax 1, 4
.Axis.Depth.SetMinMax 2, 4
End With
End Sub
That works, but try the SetMinMax with different parameters:
.Axis.Bottom.SetMinMax 10, 40
.Axis.Depth.SetMinMax 20, 40
OR
.Axis.Bottom.SetMinMax -1, 2
.Axis.Depth.SetMinMax -2, 0
The chart is not seen or only partially seen. This is indicative of the problem I'm seeing in my actual code. When using .asSurface.AddArrayGrid, how can I display the chart data within the max/min I want since AddArrayGrid's parameter list does not provide this infomation? Thanks!