Page 1 of 1

Fastline error?

Posted: Thu Jul 20, 2006 6:33 am
by 9529132
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

Posted: Thu Jul 20, 2006 8:06 am
by narcis
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.

Posted: Thu Jul 20, 2006 9:52 am
by 9529132
Hi, Narcís,

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

David

Posted: Thu Jul 20, 2006 9:54 am
by narcis
Hi David,

Ok, please send it to me.

Thanks in advance.

Posted: Thu Jul 20, 2006 10:02 am
by 9529132
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

Posted: Fri Jul 21, 2006 10:26 am
by narcis
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);

Posted: Mon Jul 24, 2006 1:03 am
by 9529132
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

Posted: Mon Jul 24, 2006 7:40 am
by narcis
Hi David,

Yes, you can also use that.

Posted: Mon Jul 24, 2006 8:30 am
by 9529132
Thank you very much!