Colour Each Line Problem

TeeChart for ActiveX, COM and ASP
Post Reply
LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Colour Each Line Problem

Post by LAL » Mon May 04, 2009 2:23 am

I'm potentially displaying multiple line series. When I have only one series I colour each point depending on the data (using 'colour each line' with pointers NOT visible).

When I display multiple series I want to give each series a 'solid' colour, so that they are easier to tell apart. Ideally I'd like to use the autogenerated line colours here. However, I find that the 'colour each line' flag only works when the line pointers are visible.

I don't want to have to 'recolour' all my data points and I don't want to have the pointers visible. What can I do?

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Answer found

Post by LAL » Mon May 04, 2009 2:34 am

OK, I worked around this by putting the pointers on using the 'psNothing' style, but I still think the 'Colour each line' flag should work regardless of the visibility of the pointers.

Thanks!

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

Post by Narcís » Mon May 04, 2009 7:27 am

Hi LVL,

Using code below works fine for me here using latest TeeChart Pro v8 ActiveX maintenance release available at the client area.

Code: Select all

Private Sub Command1_Click()
    TChart1.Series(0).asLine.ColorEachLine = False
End Sub

Private Sub Form_Load()
    TChart1.AddSeries scLine
    
    TChart1.Series(0).asLine.ColorEachLine = True
    
    TChart1.Series(0).Add 5, "", vbRed
    TChart1.Series(0).Add 6, "", vbBlue
    TChart1.Series(0).Add 4, "", vbYellow
    TChart1.Series(0).Add 2, "", vbGreen
    TChart1.Series(0).Add 3, "", vbWhite
End Sub
Does it work fine for you?

Thanks in advance.
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

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Post by LAL » Mon May 04, 2009 8:42 pm

Hi Narcís,

Yes, that code works, but this code doesn't:

Code: Select all

Private Sub Command1_Click()
    TChart1.Series(0).asLine.ColorEachLine = Not TChart1.Series(0).asLine.ColorEachLine
End Sub

Private Sub Form_Load()
    TChart1.Aspect.View3D = False
    TChart1.AddSeries scLine
    
    TChart1.Series(0).asLine.ColorEachLine = True
    
    TChart1.Series(0).Add 5, "", vbRed
    TChart1.Series(0).Add 6, "", vbBlue
    TChart1.Series(0).Add 4, "", vbYellow
    TChart1.Series(0).Add 2, "", vbGreen
    TChart1.Series(0).Add 3, "", vbWhite
End Sub

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

Post by Narcís » Tue May 05, 2009 7:58 am

Hi LVL,

Thanks for the information. I see this only occurs in 2D charts. I have added the issue (TV52014124) to the defect list to be investigated.
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

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

Re: Colour Each Line Problem

Post by Narcís » Thu Mar 18, 2010 10:55 am

Hi LVL,

Just wanted to let you know that TV52014124 has been fixed for next v8 maintenance release.
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

Post Reply