Page 1 of 1

changing color issue

Posted: Sat Jul 24, 2004 9:57 am
by 6924221
In my application, I add data to series like this:
void CMyTestView::OnTimer(UINT nIDEvent)
{
m_time++;
CTChart * pTC = (CTChart*)GetDlgItem(IDC_TCHART1);
pTC->Series(0).AddXY(m_time,rand(),"",m_color);
CFormView::OnTimer(nIDEvent);
}
Then I changed the m_color to an new color. But the data added befor did not change. How can I change the whole series to the new color.
Thank you!

Posted: Sun Jul 25, 2004 11:33 am
by Pep
Hi,

to change the whole series color you must use :
m_chart.Series(0).SetColor(color);

Posted: Mon Jul 26, 2004 12:44 am
by 6924221
But it does not work in our application. I have RefreshSeries() and Repaint(). And It is the same. I use the Pro V5.

Posted: Mon Jul 26, 2004 8:40 am
by Pep
Hi,
I've posted one example which into the steema.public.attachments newsgroup which works fine here. Could you please test it.