Page 1 of 1

Can't color Series

Posted: Wed Feb 22, 2006 1:06 pm
by 9527514
Hello,

I'm trying to set specific colours for a Series, but every change I make results in a black line, no matter which colour i choose.
Here is a simple code example:


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim vbBlue As System.UInt32
Dim count As Integer = 10
Dim yvalue() As Double = {3, 6, 9, 13, 19, 22, 29, 31, 36, 42}
Dim xvalue() As Double = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

With AxTChart1
.Series(0).AddArray(count, yvalue, xvalue)
.Series(0).asFastLine.DrawAllPoints = False
.Series(0).Color = vbBlue
End With

End Sub


I'm working with Visual Studio 2003, using VB.
TeeChart Pro v7.0.0.4

Any idea what might could be the problem?

Regards,
Mark

Posted: Wed Feb 22, 2006 1:36 pm
by narcis
Hi Mark,

This is because vbBlue is not defined in Microsoft .NET Framework v1.1. However, the following code works fine.

Code: Select all

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim vbBlue As System.UInt32

        vbBlue = Convert.ToUInt32(RGB(0, 0, 255))

        Dim count As Integer = 10
        Dim yvalue() As Double = {3, 6, 9, 13, 19, 22, 29, 31, 36, 42}
        Dim xvalue() As Double = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

        With AxTChart1
            .Series(0).AddArray(count, yvalue, xvalue)
            .Series(0).asFastLine.DrawAllPoints = False
            .Series(0).Color = vbBlue
        End With
    End Sub

Posted: Wed Feb 22, 2006 2:00 pm
by 9527514
Hi,

thanks for the very quick answer ;)

Mark