Page 1 of 1

Series Color index

Posted: Tue Jul 04, 2006 5:50 am
by 9531181
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

Posted: Tue Jul 04, 2006 9:09 am
by Marc
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

Posted: Tue Jul 04, 2006 3:07 pm
by 9531181
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=

Posted: Mon Jul 10, 2006 7:36 am
by Pep
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.