Series Color index

TeeChart for ActiveX, COM and ASP
Post Reply
Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Series Color index

Post by Faizullah Khan » Tue Jul 04, 2006 5:50 am

HI

I am using different colors for different series,but i want to change the colors at run time and required to save the color index of series.

Is this possible that I assign colors to series using index of color and also access the index of series color .

Thanks With Regard

Marc
Site Admin
Site Admin
Posts: 1258
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Jul 04, 2006 9:09 am

Hello,

I may not have correctly understood what you wish to do. TeeChart AX accepts colors as a double.

You could therefore define something like:

Code: Select all

Dim color As Double
color = RGB(255, 0, 255)
TChart1.Series(0).color = color
where color in this case would have the value 16711935 and could be saved with that value. You could create your own array to save and load those Series Colors and use the index to the array to load the colour required.

Please let us know if that doesn't answer the question.

Regards,
Marc Meumann
Steema Support

Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Post by Faizullah Khan » Tue Jul 04, 2006 3:07 pm

Hi

The next two line of code have the same functionality

TChart1.Series(0).asLine.LinePen.Style = psSolid
TChart1.Series(0).asLine.LinePen.Style = 0

'psSolid = 0;
'psDash = 1;
'psDot = 2;
'psDashDot = 3;
'psDashDotDot = 4;
'psClear = 5;
'psInsideFrame = 6;

so in the same way i want to know the index of color if I use this line of code to solor the series.

TChart1.Series(i).asLine.LinePen.Color =

OR

TChart1.Series(i).color=

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 10, 2006 7:36 am

Hi,

this cannot be done in the same way, as the automatic colors are obtained from a predefined array, not as the options you're referencing, obtained from constants.

Post Reply