No axis min / max using AddArrayGrid or SetMinMax

TeeChart for ActiveX, COM and ASP
Post Reply
DTech
Newbie
Newbie
Posts: 15
Joined: Wed Sep 29, 2004 4:00 am
Location: Suwanee, Georgia, USA
Contact:

No axis min / max using AddArrayGrid or SetMinMax

Post by DTech » Mon Nov 15, 2004 8:33 pm

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.
Thanks, DTech

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

Post by Pep » Wed Nov 17, 2004 10:42 am

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

DTech
Newbie
Newbie
Posts: 15
Joined: Wed Sep 29, 2004 4:00 am
Location: Suwanee, Georgia, USA
Contact:

Other SetMinMax parameters shift plot around

Post by DTech » Thu Nov 18, 2004 4:14 pm

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!
Thanks, DTech

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

Post by Pep » Sun Nov 21, 2004 11:04 pm

Hi,

please ,see my other post here

Post Reply