Fastline error?

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Fastline error?

Post by David » Thu Jul 20, 2006 6:33 am

Hi,

I am drawing a fastline from right to left of the chart, i.e., AddRealTime(x,y,"",RGB(255,0,0)); with x gradually decreases. However, the series can't be correctly displayed and sometimes it could refresh but sometimes it couldn't. I tracked everything and could find what's wrong. then accidently I changed the width of the fastline with
m_chart1.Series(0).GetPen().SetWidth(2);
and it worked! after I chagned the line width back to 1 or comment this line to use default line width, the problem appears again. Any suggestion how to solve this problem if I have to use default line width?

Thank you very much!
David

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 20, 2006 8:06 am

Hi David,

I'm unable to reproduce he issue here. Could you please send us an example we can run "as-is" or some code so that we can reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Thu Jul 20, 2006 9:52 am

Hi, Narcís,

I can't visit the newsgroup. Can you email the code to you?

David

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 20, 2006 9:54 am

Hi David,

Ok, please send it to me.

Thanks in advance.
Last edited by Narcís on Wed Oct 04, 2006 11:05 am, edited 1 time in total.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Thu Jul 20, 2006 10:02 am

Hi, Narcís,

Code is sent out. There are two problems with that code and I have stated in the email.

Thank you very much.
David

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jul 21, 2006 10:26 am

Hi David,

Thanks for the code.

We could reproduce the issue here. It is a bug which I've added to our defect list (TA05011613) to be fixed ASAP. In the meantime, a workaround is calling Repaint after adding each point:

Code: Select all

	m_chart1.Series(0).GetAsFastLine().AddRealTime(xx,yy,"",RGB(255,0,0));
	m_chart1.Repaint();
Regarding the tool issue, it works fine using the code below. You should do it that way as every time you remove a tool the index decreases and could raise an error because the tool is not found.

Code: Select all

		for(int i = 0;i<m_chart1.GetTools().GetCount();i++)
			m_chart1.GetTools().Delete(0);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Mon Jul 24, 2006 1:03 am

Hi, Narcís,

The pen width problem can be solved with your code. For the tool issue, is it correct to just use m_chart1.GetTools().Clear() to remove all the tool components added before?

Thank you very much!
David

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jul 24, 2006 7:40 am

Hi David,

Yes, you can also use that.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Mon Jul 24, 2006 8:30 am

Thank you very much!

Post Reply