Page 1 of 1

Adding multiple scLine series

Posted: Tue Aug 23, 2005 1:11 pm
by 9527974
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

Posted: Tue Aug 23, 2005 2:17 pm
by narcis
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.