VC++ SetPointColor problem

TeeChart for ActiveX, COM and ASP
Post Reply
cyborg
Newbie
Newbie
Posts: 2
Joined: Mon Nov 03, 2003 5:00 am
Location: USA

VC++ SetPointColor problem

Post by cyborg » Wed Jan 07, 2004 7:11 pm

Hi,
I need to change color of a part of the curve within one series
like in example below:

m_Chart1.AddSeries(scFastLine);
m_Chart1.Series(0).SetPointColor(i, RGB(0, 255, 255);
m_Chart1.Series(0).SetColorEachPoint(TRUE);

for(i=0; i<100; i++)
m_Chart1.Series(0).AddXY(i, i,"x", 0);

for(i=0; i<50; i++) // try to change color of first half
m_Chart1.Series(0).SetPointColor(i, RGB(0, 255, 0);

SetPointColor doesn't seem to work, this way, any ideas?
Documentation is very, very limited...
thanks!

cyborg
Newbie
Newbie
Posts: 2
Joined: Mon Nov 03, 2003 5:00 am
Location: USA

Post by cyborg » Wed Jan 07, 2004 8:24 pm

I notice on the other post that scFastLine doesn't support this feature.
So I have to use scLine. But when I changed to scLine, the line
itself is very wide not like with scFastLine.
I tried these methods but could not get the line thinner, only wider.

m_Chart1.AddSeries(scLine);
m_Chart1.Series(0).GetAsLine().GetLinePen().SetWidth(10);
m_Chart1.Series(0).GetAsLine().GetBrush().SetStyle(5);

for(i=0; i<10; i++){
m_Chart1.Series(0).AddXY(i, i,"", clTeeColor );

????????????????

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

Post by Pep » Wed Jan 07, 2004 9:35 pm

You could set the View3D to False using :

m_Chart1.GetAspect().SetView3D(false);

Josep Lluis Jorge
http://support.steema.com

Post Reply