Adding multiple scLine series

TeeChart for ActiveX, COM and ASP
Post Reply
Jeff Lary
Newbie
Newbie
Posts: 1
Joined: Mon Aug 08, 2005 4:00 am
Location: University of Connecticut

Adding multiple scLine series

Post by Jeff Lary » Tue Aug 23, 2005 1:11 pm

ActiveX Version 7.0, VB6:
I'm trying to add a large number of line series to a chart and I've got an array of OLE_COLORs that I want to cycle through using, e.g., oleColor(j mod 16). I can't seem to get the lines to come out with my colors and after the 15th or 16th line all of the remaining lines are gray, so it is obviously using the default color scheme. What properties (pen colors?) need to be set to get the lines to show my color scheme?

Thanks,
Jeff Lary

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 Aug 23, 2005 2:17 pm

Hi Jeff,

You could try using something like:

Code: Select all

Private Sub Form_Load()
    For i = 0 To 25
        TChart1.AddSeries scLine
        With TChart1.Series(i)
            .FillSampleValues 10
            .Color = RGB(i * 10, i * 10, i * 10)
        End With
    Next
End Sub
This code sets a different color for every series.
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