AddXY ?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Jeff
Newbie
Newbie
Posts: 22
Joined: Fri Nov 15, 2002 12:00 am
Location: Virginia, United States

AddXY ?

Post by Jeff » Thu Jul 29, 2004 12:31 pm

I used the upgrade wizard in VB.NET to convert a VB6 project. The code is below. Basically, I need to know what the conversion is for the .AddXY (old TChart) to the new .NET Tchart.

VB6 --
With tchCorrectionCurve.Series(intLower)
For i = 0 To 7
.AddXY gmnrMainRotor.Curve(0, i), gmnrMainRotor.Curve(1, i), "", clTeeColor
Next i
End With

After conversion to VB.NET
Dim tchCorrectionCurve As Object
With tchCorrectionCurve.Series(intLower)
For i = 0 To 7
..AddXY(gmnrMainRotor.Curve(0, i), gmnrMainRotor.Curve(1, i), "", TeeChart.EConstants.clTeeColor)
Next i
End With

I commented out the Dim tchCorrectionCurve As Object
What would the new line be for the AddXY and the TeeChart.EConstants.clTeeColor ?

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

Post by Pep » Fri Jul 30, 2004 8:14 am

Hi Jeff,
What would the new line be for the AddXY and the TeeChart.EConstants.clTeeColor ?
it's the same to use the following code (chaning the x and y) :

Code: Select all

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x, y As Integer
        Dim rnd As New Random
        With TChart1.Series(0)
            For x = 0 To 7
                y = rnd.Next(100)
                .Add(x, y)
            Next x
        End With
    End Sub

Post Reply