addFastLine() does not repaint the chart.

TeeChart for ActiveX, COM and ASP
Post Reply
iblee
Newbie
Newbie
Posts: 7
Joined: Fri May 31, 2013 12:00 am

addFastLine() does not repaint the chart.

Post by iblee » Thu May 28, 2015 2:17 am

I am upgrading tchart in my program from 8.0 to v2014.
In the program, I use fastline series to draw data received from my HW.
I works well in 8.0 but does not in 2014.

in 2014, series is not updated when I call AddRealTime().
I tested this and found that if I set setMinMax() to bottom axis, update does not work or rarely called.

I set Tchart as below

Code: Select all

m_chart.ClearChart();
	
	m_chart.GetAspect().SetView3D(false);

	m_chart.AddSeries(scFastLine);
	
	
	m_chart.GetAxis().GetBottom().SetAutomatic(FALSE);
	m_chart.GetAxis().GetBottom().SetMaximum(10);
	

	m_chart.GetAxis().GetLeft().SetAutomatic(FALSE);
	m_chart.GetAxis().GetLeft().SetMinMax(-10, 10);


and call addRealTime in timer function


void CTChart2015TestDlg::OnTimer(UINT_PTR nIDEvent)
{
	// TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.

	m_chart.Series(0).GetAsFastLine().AddRealTime(float(m_nCount)/30, sinf(float(m_nCount)), NULL, 0);
	//m_chart.Series(0).GetAsFastLine().
	m_nCount++;

	CDialogEx::OnTimer(nIDEvent);
}
How can I use fastline with axis.SetMinMax()?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: addFastLine() does not repaint the chart.

Post by Yeray » Fri May 29, 2015 9:15 am

Hello,

The discussion here may put some light:
http://www.teechart.net/support/viewtop ... =1&t=13381
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

iblee
Newbie
Newbie
Posts: 7
Joined: Fri May 31, 2013 12:00 am

Re: addFastLine() does not repaint the chart.

Post by iblee » Sat May 30, 2015 3:14 am

I already used fastline series without any problem in V8.0.
In 8.0, calling addRealTime drew new added data in chart. (not whole chart)

After I upgraded to v2014, the chart is only repainted when the data is out of axis range.
If the added data located inside of axis range, series does not paint newly added one.

iblee
Newbie
Newbie
Posts: 7
Joined: Fri May 31, 2013 12:00 am

Re: addFastLine() does not repaint the chart.

Post by iblee » Sat May 30, 2015 12:28 pm

I tested fastline series with v8.0, v2012, v2014 and v2015. (2012 and 2015 was evaluation ver.)
The code tested was exactly same and only replaced tchart version.
I tried to test with v2013 evaluation version but threre is some missing header file(ThemesList.h)

The result is very interesting.
v8.0 and v2012 draws real time plotting without any problems but v2014 and v2015 does not repaint the data added with addRealTime().

Our company has v2014 license then could we use v2012?


My test code is hear.

Initialization.

Code: Select all

m_chart.GetAspect().SetView3D(FALSE);
	m_chart.AddSeries(scFastLine);
	m_chart.Series(0).GetXValues().SetOrder(loNone);

	m_chart.GetAxis().GetLeft().SetAutomatic(FALSE);
	m_chart.GetAxis().GetLeft().SetMinMax(-1,1);
	m_chart.GetAxis().GetBottom().SetAutomatic(FALSE);
	m_chart.GetAxis().GetBottom().SetMinMax(0, 10);

	m_nCount   = 0;
	this->SetTimer(0, 30, NULL);
In Timer

Code: Select all



void Ctest2015Dlg::OnTimer(UINT_PTR nIDEvent)
{

	m_chart.Series(0).GetAsFastLine().AddRealTime(double(this->m_nCount)/30.0f, sinf(double(this->m_nCount)/30.0f*3.14), NULL, 0);
	m_nCount++;
	

	CDialogEx::OnTimer(nIDEvent);
}

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: addFastLine() does not repaint the chart.

Post by Yeray » Mon Jun 01, 2015 3:29 pm

Hello,

I see this was broken in TeeChart ActiveX v2014.0.0.3 but still worked fine in v2014.0.0.2.
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1220

In the meanwhile, an actual license should give access to a previous version, so you should be able to try v2014.0.0.2.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply