chart shows no data unless added before calling subroutines
chart shows no data unless added before calling subroutines
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.
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.
Hi,
have you tried calling the Refresh method ? :
tChart1.Refresh();
have you tried calling the Refresh method ? :
tChart1.Refresh();
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi -
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!
If you could send a small project to: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.
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/
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/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
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!
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/
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/
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.
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.
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
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:
The problem, AFAIC, is in the getIP_String() function where the following line:
consistantly throws a null reference exception.
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.
Code: Select all
Dim stream As NetworkStream = conn.GetStream()
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/
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/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi -
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.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.
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/
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/
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.
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.
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi,
You're welcomeThank you again Chris,
I'm running VS.NET 2003 and Windows 2003.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 ?
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.If you have seen a problem similar to this before, could you give us any suggestions on resolving it or finding a workaround ?
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/
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/