Page 1 of 1

Hello why doesn't work nearest point ?

Posted: Wed Nov 01, 2006 1:41 pm
by 9089070
Do it in this way:

Code: Select all

	m_Chart.GetTools().Add(tcNearest);
	m_Chart.GetTools().GetItems(0).GetAsNearest().SetDrawLine(true);
	m_Chart.GetTools().GetItems(0).GetAsNearest().SetStyle(hsRectangle);
	m_Chart.GetTools().GetItems(0).SetActive(true);
And what I see? Nothing :( What I did wrong?

Posted: Tue Nov 07, 2006 4:26 pm
by Pep
Hi Nuzur,

have you tried setting the Series where you want to be applied ?
m_Chart.GetTools().GetItems(0).GetAsNearest().SetSeries(....);

Posted: Wed Nov 08, 2006 10:57 am
by 9089070
Pep wrote:Hi Nuzur,

have you tried setting the Series where you want to be applied ?
m_Chart.GetTools().GetItems(0).GetAsNearest().SetSeries(....);
What exactly I need use for SetSeries(....) in place of ...
I'd try there position of Series in TeeChart.

Posted: Wed Nov 08, 2006 4:26 pm
by narcis
Hi Nuzur,

Here you should use the series you want the tool for, for example:

Code: Select all

m_Chart.GetTools().GetItems(0).GetAsNearest().SetSeries(m_Chart.Series(0));

Posted: Thu Nov 09, 2006 9:37 am
by 9089070
Like U Said don\t work, but if make some little changes :)

Code: Select all

				m_Chart.GetTools().GetItems(0).GetAsNearest().SetSeries(_variant_t(m_Chart.Series(0))
Thank U now it ok