Can't color Series

TeeChart for ActiveX, COM and ASP
Post Reply
Zems
Newbie
Newbie
Posts: 10
Joined: Mon Jun 27, 2005 4:00 am
Location: Germany

Can't color Series

Post by Zems » Wed Feb 22, 2006 1:06 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 22, 2006 1:36 pm

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
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Zems
Newbie
Newbie
Posts: 10
Joined: Mon Jun 27, 2005 4:00 am
Location: Germany

Post by Zems » Wed Feb 22, 2006 2:00 pm

Hi,

thanks for the very quick answer ;)

Mark

Post Reply