chart shows no data unless added before calling subroutines

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

chart shows no data unless added before calling subroutines

Post by ATS » Thu Jul 22, 2004 3:31 pm

My chart has 2 "line" series that display OK when their data is added in code contained in form1's activated event subroutine.

However, if the same code is executed in another subroutine in form1.vb, as part of a second thread, the chart shows no data. That thread is started by the activated event.

I tried adding calls the following calls to the (parent) process that execute after the addition of data:
.Repaint(), .Show(), .Update() and similar methods

This does not help.

The chart itself is public to all code. Is it worth me emailing the code to you to review ? It is a small app with only one chart and ~200 hundred lines of VB .Net code.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jul 22, 2004 11:36 pm

Hi,

have you tried calling the Refresh method ? :
tChart1.Refresh();

ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

Post by ATS » Fri Jul 23, 2004 6:40 pm

Yes, I did try .Refresh(), and I tried it again today.

When the .Add() code works (outside of the thread), there is no .Refresh() or similar method required.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 27, 2004 12:04 pm

Hi -
The chart itself is public to all code. Is it worth me emailing the code to you to review ? It is a small app with only one chart and ~200 hundred lines of VB .Net code.
If you could send a small project to:
news://www.berneda.com/steema.public.attachments

that I can run "as-is" to reproduce the problem here then that would be greatly appreciated.

Many thanks!
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

Post by ATS » Tue Aug 10, 2004 2:25 pm

We just loaded 4 files into the newsgroup you specified. The files are:

Readme.txt
alignStep.zip
teeClient.py
teeX.dat

I am sorry for not responding earlier, as I was on holidays. :D

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 16, 2004 11:10 am

Hi --

I've just run your test project with TeeChart for .NET version 1.1.1675.27998 (the latest release). Setting chartTest to true and running the project causes both the Transmit and Reflect series to adisplay properly ... what should I be looking for here? Could you tell me the steps I need to take to reproduce the problem?

Many thanks!
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

Post by ATS » Mon Aug 16, 2004 4:07 pm

Thank you for responding. Please read the content of 'Readme.txt'. The presence of this file was noted in my previous post.

As noted in that file, 'chartTest' needs to be false. If getting input via a socket is awkward for you to test with, feel free to just modify the app to hardcode that input. Or I can do that for you.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Aug 17, 2004 8:58 am

Hi ..

Using the python scripts downloadable from http://www.codesampler.com/source/py_socket.zip
I can create a client-server connection through port 2096 on my machine.

I now set ipPort to 2096, localAddr to 172.26.0.3 and chartTest to false and run your application. This is the output copied from lastRun.txt:

Code: Select all

starting alignStep ...
sweep start = 0, end = 3
coarse step = 0.1, fine step (unused) = 0.05
coarse tol = 0.1, fine tol = 0.01
started TcpListener on port 2096
starting getIP_String ...
listening on port (should not be blocking) 2096
alignStep closing ...
Caught system null reference exception - likely no connection active.
The problem, AFAIC, is in the getIP_String() function where the following line:

Code: Select all

Dim stream As NetworkStream = conn.GetStream()
consistantly throws a null reference exception.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

Post by ATS » Thu Sep 23, 2004 3:25 pm

We loaded 2 new files in the directory you mentioned earlier:

atsChartTest.zip
atsReadme0921.txt

Please read the text file to understand how I simplified the application you tested earlier. It should now be much easier for you to run our app, without having to use sockets or data files.

Thank you.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Sep 27, 2004 2:47 pm

Hi -
We loaded 2 new files in the directory you mentioned earlier:

atsChartTest.zip
atsReadme0921.txt

Please read the text file to understand how I simplified the application you tested earlier. It should now be much easier for you to run our app, without having to use sockets or data files.
Thank you.

I have run your code and can see that no data is being added to the chart.

So, I made an experiment; I added a ListBox to the form and then everywhere data was being added to the chart (using the Steema.TeeChart.Styles.Series.Add Method) I added a line similar to the following:
ListBox1.Items.Add(AngleC(i).ToString() + currentsA(i).ReflectC.ToString())

Running you code again *did not add any data to the ListBox*. This means that the problem with data flow in your application is not specific to TeeChart.

Please let me know if you want me to post my modifications to the attachments newsgroup.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

ATS
Newbie
Newbie
Posts: 13
Joined: Tue Apr 08, 2003 4:00 am
Location: Ontario, Canada
Contact:

Post by ATS » Mon Sep 27, 2004 5:22 pm

Thank you again Chris,

If I am understanding your post correctly, the problem we see is in VS and/or Windows 2000/XP, no ?

May I ask what versions of VS and Windows 2000/XP you used to do your test ?

If you have seen a problem similar to this before, could you give us any suggestions on resolving it or finding a workaround ?

Cheers.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Sep 28, 2004 5:40 am

Hi,
Thank you again Chris,
You're welcome :)
If I am understanding your post correctly, the problem we see is in VS and/or Windows 2000/XP, no ?

May I ask what versions of VS and Windows 2000/XP you used to do your test ?
I'm running VS.NET 2003 and Windows 2003.
If you have seen a problem similar to this before, could you give us any suggestions on resolving it or finding a workaround ?
No, I haven't seen this problem before. If I was you I would start stripping the code down to its bare essentials to see where the problem is occurring.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply