Page 1 of 1

Erasing a plotted line

Posted: Tue Mar 11, 2008 9:51 pm
by 15047739
If I create several 2D line plots. Instead of clearing the entire chart, I want to erase only one 2D line. I am using Visual C++ 6.0.

Posted: Wed Mar 12, 2008 9:32 am
by narcis
Hi marathoner,

Yes, you can remove one single series using RemoveSeries method as shown here:

Code: Select all

	long series1;	
	series1 = m_Chart1.AddSeries(scHistogram);
	
	m_Chart1.Series(series1).SetColor(RGB(255,0,0));

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

	m_Chart1.RemoveSeries(series1);