Page 1 of 1

No axis min / max using AddArrayGrid or SetMinMax

Posted: Mon Nov 15, 2004 8:33 pm
by 9524337
The AddArrayGrid method below gives me a nice surface.

TChart1.Series(2).asSurface.AddArrayGrid UBound(Positions), UBound(StepAngles), AmpGrid

Using AddArrayGrid, however, does not supply the min and max values for the X and Z axes that I need. So I thought the solution would be to use SetMinMax, but I'm having no luck getting the desired min and max values for axes displayed when I use AddArrayGrid on the surface series.

Any thoughts of what to try would be much appreciated.

Posted: Wed Nov 17, 2004 10:42 am
by Pep
Hi,

using the following simple example works fine here (using the v7) :

Code: Select all

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

Other SetMinMax parameters shift plot around

Posted: Thu Nov 18, 2004 4:14 pm
by 9524337
Yes, 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. 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!

Posted: Sun Nov 21, 2004 11:04 pm
by Pep
Hi,

please ,see my other post here