Connecting Tech Pros Worldwide Help | Site Map

Graphing data in VB.net - What is the fastest and easiest way?

Newbie
 
Join Date: Sep 2009
Posts: 15
#1: Sep 15 '09
What is the fastest and easiest way to graph data in VB.net?

How do I export 2 columns of data in Vb.net, to either an excel file or to a notepad file?
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#2: Sep 15 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Quote:
How do I export 2 columns of data in Vb.net, to either an excel file or to a notepad file?
I guess that all depends on what your "columns" really consist of in code.
Do you have a two dimensional string array? string[10, 20]
Do you have a dictionary? Dictionary<int, string>

Loop through whatever variable list/array you have and write the values to a text file. You might want to go to MSDN and read up on the Streamwriter.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#3: Sep 15 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Quote:
What is the fastest and easiest way to graph data in VB.net?
Read up on MSDN regarding the Drawing class.
http://msdn.microsoft.com/en-us/library/bb196414.aspx
Newbie
 
Join Date: Sep 2009
Posts: 15
#4: Sep 15 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


The data is in the form of a two dimensional string array.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#5: Sep 15 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Quote:

Originally Posted by petesquawk View Post

The data is in the form of a two dimensional string array.

Then my original suggestion holds up well.
Quote:

Originally Posted by tlhintoq

Loop through whatever variable list/array you have and write the values to a text file. You might want to go to MSDN and read up on the Streamwriter.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx

If you comma-separate or tab-separate the two fields it will import to Excel easily.
Newbie
 
Join Date: Sep 2009
Posts: 15
#6: Sep 16 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Quote:
I guess that all depends on what your "columns" really consist of in code.
Do you have a two dimensional string array? string[10, 20]
Do you have a dictionary? Dictionary<int, string>

Loop through whatever variable list/array you have and write the values to a text file. You might want to go to MSDN and read up on the Streamwriter.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx
I haven't gotten to the graphing portion yet, but the first VB example on http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx works very well. Thank you.
Newbie
 
Join Date: Sep 2009
Posts: 15
#7: Sep 16 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Quote:
Read up on MSDN regarding the Drawing class.
http://msdn.microsoft.com/en-us/library/bb196414.aspx
I don't know how to implement that code for vb.

I have been able to get a ZedGraph application working by itself but I haven't been able to get it to work with my code yet. I tried installing MS Chart control but I was unable to get that to work, even after upgrading to SP1 for 3.5.

I am thinking that I might be able to get ZedGraph to work if I put more time into it.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#8: Sep 16 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


Take a look around the rest of the MSDN. There is LOTS of documentation.
Take a look at the drawing namespace
http://msdn.microsoft.com/en-us/libr...m.drawing.aspx

Here's a tip: Google for the terms "MSDN System.Drawing"
Basically if you Google "MSDN" plus whatever it is you are looking for you will get all the MSDN hits related to what you are working on.
From there... "Right-Click | Open in new tab" in your browser until you find something useful. I find this great for keeping the Google reply as a table of contents and several MSDN articles open at once
Newbie
 
Join Date: Sep 2009
Posts: 15
#9: Sep 18 '09

re: Graphing data in VB.net - What is the fastest and easiest way?


I was able to get Zedgraph to work. I just needed to add under the Solution folder and Zedgraph.dll under the reference section.
Reply

Tags
graphing data