Page 1 of 1

AddXY ?

Posted: Thu Jul 29, 2004 12:31 pm
by 9079179
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 ?

Posted: Fri Jul 30, 2004 8:14 am
by Pep
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