Series Color Problem
Posted: Mon May 08, 2006 6:38 am
Hello,
I am using TeeChart V7 for visual basic 6.0.
I'm trying to set specific colours for each Series, but TeeChart assign its own color scheme.
I am assinginig color to series this way
For i = 0 To 15
' add new points to the Series...
TChart2.Series(0).AddXY i + 2, i + 5, " ", vbBlack
TChart2.Series(1).AddXY i + 5, i + 3, "", vbRed
TChart2.Series(2).AddXY i + 12, i + 2, "", vbGreen
TChart2.Series(3).AddXY i + 1, i + 3, "", vbBlue
TChart2.Series(4).AddXY i + 3, i + 6, "", vbMagenta
TChart2.Series(5).AddXY i + 7, i + 9, "", vbCyan
Next
OR
Dim scolor as string
scolor ="&H00000FF,&HFF0000,&H00FF00,&H804040,&H000000,&HFF8000,&HFF8080,&H804A80,&HFF80FF,&H806408"
SeriesColor = Split(scolor, ",") 'SeriesColor is array to hold color
For i = 0 To 15
' add new points to the Series...
TChart2.Series(0).AddXY i + 2, i + 5, "", SeriesColor(0)
TChart2.Series(1).AddXY i + 5, i + 3, "", SeriesColor(1)
TChart2.Series(2).AddXY i + 12, i + 2, "", SeriesColor(2)
TChart2.Series(3).AddXY i + 1, i + 3, "", SeriesColor(3)
TChart2.Series(4).AddXY i + 3, i + 6, "", SeriesColor(4)
TChart2.Series(5).AddXY i + 7, i + 9, "", SeriesColor(5)
TChart2.Series(6).AddXY i + 2, i + 3, "", SeriesColor(6)
TChart2.Series(7).AddXY i + 6, i + 4, "", SeriesColor(7)
TChart2.Series(8).AddXY i + 9, i + 9, "", SeriesColor(8)
TChart2.Series(9).AddXY i + 0, i + 10, "", SeriesColor(9)
Next
is there any proper way to assign the colors to the series.
Regards,
Faizullah
I am using TeeChart V7 for visual basic 6.0.
I'm trying to set specific colours for each Series, but TeeChart assign its own color scheme.
I am assinginig color to series this way
For i = 0 To 15
' add new points to the Series...
TChart2.Series(0).AddXY i + 2, i + 5, " ", vbBlack
TChart2.Series(1).AddXY i + 5, i + 3, "", vbRed
TChart2.Series(2).AddXY i + 12, i + 2, "", vbGreen
TChart2.Series(3).AddXY i + 1, i + 3, "", vbBlue
TChart2.Series(4).AddXY i + 3, i + 6, "", vbMagenta
TChart2.Series(5).AddXY i + 7, i + 9, "", vbCyan
Next
OR
Dim scolor as string
scolor ="&H00000FF,&HFF0000,&H00FF00,&H804040,&H000000,&HFF8000,&HFF8080,&H804A80,&HFF80FF,&H806408"
SeriesColor = Split(scolor, ",") 'SeriesColor is array to hold color
For i = 0 To 15
' add new points to the Series...
TChart2.Series(0).AddXY i + 2, i + 5, "", SeriesColor(0)
TChart2.Series(1).AddXY i + 5, i + 3, "", SeriesColor(1)
TChart2.Series(2).AddXY i + 12, i + 2, "", SeriesColor(2)
TChart2.Series(3).AddXY i + 1, i + 3, "", SeriesColor(3)
TChart2.Series(4).AddXY i + 3, i + 6, "", SeriesColor(4)
TChart2.Series(5).AddXY i + 7, i + 9, "", SeriesColor(5)
TChart2.Series(6).AddXY i + 2, i + 3, "", SeriesColor(6)
TChart2.Series(7).AddXY i + 6, i + 4, "", SeriesColor(7)
TChart2.Series(8).AddXY i + 9, i + 9, "", SeriesColor(8)
TChart2.Series(9).AddXY i + 0, i + 10, "", SeriesColor(9)
Next
is there any proper way to assign the colors to the series.
Regards,
Faizullah