Page 1 of 1

Colour Each Line Problem

Posted: Mon May 04, 2009 2:23 am
by 15049432
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?

Answer found

Posted: Mon May 04, 2009 2:34 am
by 15049432
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!

Posted: Mon May 04, 2009 7:27 am
by narcis
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.

Posted: Mon May 04, 2009 8:42 pm
by 15049432
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

Posted: Tue May 05, 2009 7:58 am
by narcis
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.

Re: Colour Each Line Problem

Posted: Thu Mar 18, 2010 10:55 am
by narcis
Hi LVL,

Just wanted to let you know that TV52014124 has been fixed for next v8 maintenance release.