Multiple colors on a line Serie

TeeChart for ActiveX, COM and ASP
Post Reply
Ced
Newbie
Newbie
Posts: 25
Joined: Fri Nov 15, 2002 12:00 am

Multiple colors on a line Serie

Post by Ced » Thu Dec 11, 2003 8:38 am

Hello!

I have a line serie in a red color. I want now a portion of this line to be green.
I tried with SetColorEachPoint and SetPointColor but this doesn't work.

Any idea?
Thanks

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

Post by Marc » Thu Dec 11, 2003 9:10 am

Hello,

The following syntax should work ok:

m_Chart1.Series(1).SetPointColor(2,RGB(0,255,0));

You mention you've tried SetPointColor without success, perhaps there's a different issue. I've tested this with a LineSeries. Please check the syntax and let us know if the problem still isn't cleared up.

Regards,
Marc Meumann
Steema Support

Ced
Newbie
Newbie
Posts: 25
Joined: Fri Nov 15, 2002 12:00 am

Post by Ced » Thu Dec 11, 2003 9:18 am

I used exactly the same syntax (except that the serie was stored in a member variable of my class).
In fact, my line serie contains a lot of points (something like 2000 points). So, is the color just used on the POINTS or also on the line between the points ??? I need of course the second solution (I want a portion of my line to be displayed in green)

Thanks for quick response :D

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

Post by Marc » Thu Dec 11, 2003 9:41 am

Hello,

The codeline (SetPointColor) modifies the Line colour itself and the Point colour for a LineSeries.

I've double-checked that with TeeChart AX v5 and v6.

Please check that you are not using a FastLineSeries as that Seriestype doesn't support individual colour setting for points (or line segments).

Regards,
Marc Meumann
Steema Support

Ced
Newbie
Newbie
Posts: 25
Joined: Fri Nov 15, 2002 12:00 am

Post by Ced » Thu Dec 11, 2003 10:04 am

:oops: Oooooopss, sorry ! That was it ;-)

Ok, I changed it into a normal line and now that works fine :-)

Post Reply