Page 1 of 1

VC++ SetPointColor problem

Posted: Wed Jan 07, 2004 7:11 pm
by 9079606
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!

Posted: Wed Jan 07, 2004 8:24 pm
by 9079606
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 );

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

Posted: Wed Jan 07, 2004 9:35 pm
by Pep
You could set the View3D to False using :

m_Chart1.GetAspect().SetView3D(false);

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